﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;

using CNCSoft.EWinform;
using CNCSoft.EWinform.ControlUtils;
using CNCSoft.EWinform.ERPApps;
using CNCSoft.EWinform.AGrid;
using CNCSoft.EData;

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

using System.Threading;
using System.Globalization;

using Common;

namespace CNCSoft.ErpApps.TMS {

	/// <summary>
	/// Summary description for TienMatPhieuThuHocphi.
	/// </summary>
    public class TienMatPhieuThuHocphi : System.Windows.Forms.Form
    {
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label8;
        private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		internal System.Windows.Forms.Panel pnlButtons;
		internal System.Windows.Forms.Button cmdModify;
		internal System.Windows.Forms.Button cmdCancel;
		internal System.Windows.Forms.Button cmdPrint;
		internal System.Windows.Forms.Button cmdView;
		internal System.Windows.Forms.Button cmdDelete;
        internal System.Windows.Forms.Button cmdAddNew;
		private System.Windows.Forms.TextBox txtHoTenNguoiNopTien;
        private System.Windows.Forms.TextBox txtDienGiai;
		private System.Windows.Forms.TextBox txtSoChungTu;
        private System.Windows.Forms.ComboBox cboLyDoThu;
		private System.Windows.Forms.Button cmdXemTK;
		internal System.Windows.Forms.Button cmdUpdate;
		private System.Windows.Forms.TextBox txtDiaChi;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.ToolTip toolTip1;
		private System.Windows.Forms.ErrorProvider ep;
        private System.Windows.Forms.Label lblStatus;
		private System.Windows.Forms.Panel pnlNevigator;
		internal System.Windows.Forms.Button cmdMovePrevious;
		internal System.Windows.Forms.Button cmdMoveFirst;
		internal System.Windows.Forms.Button cmdMoveLast;
		internal System.Windows.Forms.Button cmdMoveNext;
        private CNCSoft.EWinform.ValidText txtNgayChungTu;
		private System.Windows.Forms.Label lblRecordInfo;
		private System.Windows.Forms.Panel pnlBottom;
		private System.Windows.Forms.PictureBox picboxNote;
        private System.Windows.Forms.PictureBox picboxHelp;
        private TextBox txtSoTien;
        private Label label11;
        private TextBox txtSoHoaDon;
        private Label label16;
        private ValidText txtNgayHoaDon;
        private Label label18;
        private TextBox txtSerialHoaDon;
        private Label label17;
        private ListBox lstAddnew;
        private ComboBox cboNganHang;
        private Label label4;
        private Label lblSoGiayBaoHP;
        private DevExpress.XtraEditors.GridLookUpEdit gridLookUpEdit_txtMaHocSinh;
        private DevExpress.XtraGrid.Views.Grid.GridView gridLookUpEdit_txtMaHocSinhView;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_MaDoiTac;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_TenDoiTac;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_Lop;
        private Label label12;
        private TextBox txtMaNienHoc;
        private Label label7;
        private ComboBox cboLop;
        private TextBox txtSoDuThangTruoc;
        private Label label14;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_CheDo;
        private DevExpress.XtraEditors.GridLookUpEdit txtSoInvoice;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_SoChungTu;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_HoTen;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_SoTien;
        private DevExpress.XtraGrid.GridControl dgridChiTietPT;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView2;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_TaiKhoanCo;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_TieuKhoanCo;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_DienGiai;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_SoLuong;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_DonGia;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_ThanhTien;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_TaiKhoanNo;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_TieuKhoanNo;
        private DevExpress.XtraEditors.Repository.RepositoryItemCalcEdit repositoryItemCalcEdit_SoLuong;
        private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit_So;
        private DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit repositoryItemLookUpEdit_TaiKhoan;
        private TextBox txtMaCheDo;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn_SoTienMienGiam;
        private txtChonTuDanhMuc txtMaCoSo;
        private Label label5;
        private TextBox txtSoDuThangNay;
        private Label label15;
        private TextBox txtSoTienThucThu;
        private Label lblThucThu;
        private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit_NhapSoLuong;
        private Label label13;
        private TextBox txtMaHocPhi;
        private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repositoryItemTextEdit1;
		private System.ComponentModel.IContainer components;

		public TienMatPhieuThuHocphi()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TienMatPhieuThuHocphi));
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition4 = new DevExpress.XtraGrid.StyleFormatCondition();
            DevExpress.XtraGrid.StyleFormatCondition styleFormatCondition3 = new DevExpress.XtraGrid.StyleFormatCondition();
            this.gridColumn_CheDo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemTextEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.txtHoTenNguoiNopTien = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.txtDienGiai = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.txtSoChungTu = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
            this.label10 = new System.Windows.Forms.Label();
            this.cboLyDoThu = new System.Windows.Forms.ComboBox();
            this.pnlButtons = new System.Windows.Forms.Panel();
            this.cmdModify = new System.Windows.Forms.Button();
            this.cmdCancel = new System.Windows.Forms.Button();
            this.cmdPrint = new System.Windows.Forms.Button();
            this.cmdView = new System.Windows.Forms.Button();
            this.cmdDelete = new System.Windows.Forms.Button();
            this.cmdAddNew = new System.Windows.Forms.Button();
            this.cmdUpdate = new System.Windows.Forms.Button();
            this.txtDiaChi = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.txtSoTien = new System.Windows.Forms.TextBox();
            this.txtSoHoaDon = new System.Windows.Forms.TextBox();
            this.txtSerialHoaDon = new System.Windows.Forms.TextBox();
            this.txtSoDuThangTruoc = new System.Windows.Forms.TextBox();
            this.cmdXemTK = new System.Windows.Forms.Button();
            this.picboxNote = new System.Windows.Forms.PictureBox();
            this.picboxHelp = new System.Windows.Forms.PictureBox();
            this.txtSoDuThangNay = new System.Windows.Forms.TextBox();
            this.txtSoTienThucThu = new System.Windows.Forms.TextBox();
            this.txtMaHocPhi = new System.Windows.Forms.TextBox();
            this.lblStatus = new System.Windows.Forms.Label();
            this.pnlBottom = new System.Windows.Forms.Panel();
            this.pnlNevigator = new System.Windows.Forms.Panel();
            this.cmdMoveFirst = new System.Windows.Forms.Button();
            this.cmdMovePrevious = new System.Windows.Forms.Button();
            this.cmdMoveNext = new System.Windows.Forms.Button();
            this.cmdMoveLast = new System.Windows.Forms.Button();
            this.lblRecordInfo = new System.Windows.Forms.Label();
            this.txtNgayChungTu = new CNCSoft.EWinform.ValidText();
            this.label11 = new System.Windows.Forms.Label();
            this.label16 = new System.Windows.Forms.Label();
            this.label17 = new System.Windows.Forms.Label();
            this.txtNgayHoaDon = new CNCSoft.EWinform.ValidText();
            this.label18 = new System.Windows.Forms.Label();
            this.lstAddnew = new System.Windows.Forms.ListBox();
            this.label4 = new System.Windows.Forms.Label();
            this.cboNganHang = new System.Windows.Forms.ComboBox();
            this.lblSoGiayBaoHP = new System.Windows.Forms.Label();
            this.gridLookUpEdit_txtMaHocSinh = new DevExpress.XtraEditors.GridLookUpEdit();
            this.gridLookUpEdit_txtMaHocSinhView = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn_MaDoiTac = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_TenDoiTac = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_Lop = new DevExpress.XtraGrid.Columns.GridColumn();
            this.txtMaNienHoc = new System.Windows.Forms.TextBox();
            this.label7 = new System.Windows.Forms.Label();
            this.label12 = new System.Windows.Forms.Label();
            this.cboLop = new System.Windows.Forms.ComboBox();
            this.label14 = new System.Windows.Forms.Label();
            this.txtSoInvoice = new DevExpress.XtraEditors.GridLookUpEdit();
            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn_SoChungTu = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_HoTen = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_SoTien = new DevExpress.XtraGrid.Columns.GridColumn();
            this.dgridChiTietPT = new DevExpress.XtraGrid.GridControl();
            this.gridView2 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn_TaiKhoanCo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemLookUpEdit_TaiKhoan = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();
            this.gridColumn_TieuKhoanCo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_DienGiai = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_SoLuong = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemTextEdit_NhapSoLuong = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            this.gridColumn_DonGia = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemTextEdit_So = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            this.gridColumn_ThanhTien = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_SoTienMienGiam = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_TaiKhoanNo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn_TieuKhoanNo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemCalcEdit_SoLuong = new DevExpress.XtraEditors.Repository.RepositoryItemCalcEdit();
            this.txtMaCheDo = new System.Windows.Forms.TextBox();
            this.txtMaCoSo = new CNCSoft.ErpApps.TMS.txtChonTuDanhMuc();
            this.label5 = new System.Windows.Forms.Label();
            this.label15 = new System.Windows.Forms.Label();
            this.lblThucThu = new System.Windows.Forms.Label();
            this.label13 = new System.Windows.Forms.Label();
            this.ep = new System.Windows.Forms.ErrorProvider(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).BeginInit();
            this.pnlButtons.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.picboxNote)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.picboxHelp)).BeginInit();
            this.pnlBottom.SuspendLayout();
            this.pnlNevigator.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gridLookUpEdit_txtMaHocSinh.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridLookUpEdit_txtMaHocSinhView)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtSoInvoice.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgridChiTietPT)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEdit_TaiKhoan)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit_NhapSoLuong)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit_So)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemCalcEdit_SoLuong)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ep)).BeginInit();
            this.SuspendLayout();
            // 
            // gridColumn_CheDo
            // 
            resources.ApplyResources(this.gridColumn_CheDo, "gridColumn_CheDo");
            this.gridColumn_CheDo.FieldName = "MaCheDo";
            this.gridColumn_CheDo.Name = "gridColumn_CheDo";
            // 
            // repositoryItemTextEdit1
            // 
            resources.ApplyResources(this.repositoryItemTextEdit1, "repositoryItemTextEdit1");
            this.repositoryItemTextEdit1.DisplayFormat.FormatString = "N0";
            this.repositoryItemTextEdit1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemTextEdit1.Mask.AutoComplete = ((DevExpress.XtraEditors.Mask.AutoCompleteType)(resources.GetObject("repositoryItemTextEdit1.Mask.AutoComplete")));
            this.repositoryItemTextEdit1.Mask.BeepOnError = ((bool)(resources.GetObject("repositoryItemTextEdit1.Mask.BeepOnError")));
            this.repositoryItemTextEdit1.Mask.EditMask = resources.GetString("repositoryItemTextEdit1.Mask.EditMask");
            this.repositoryItemTextEdit1.Mask.IgnoreMaskBlank = ((bool)(resources.GetObject("repositoryItemTextEdit1.Mask.IgnoreMaskBlank")));
            this.repositoryItemTextEdit1.Mask.MaskType = ((DevExpress.XtraEditors.Mask.MaskType)(resources.GetObject("repositoryItemTextEdit1.Mask.MaskType")));
            this.repositoryItemTextEdit1.Mask.PlaceHolder = ((char)(resources.GetObject("repositoryItemTextEdit1.Mask.PlaceHolder")));
            this.repositoryItemTextEdit1.Mask.SaveLiteral = ((bool)(resources.GetObject("repositoryItemTextEdit1.Mask.SaveLiteral")));
            this.repositoryItemTextEdit1.Mask.ShowPlaceHolders = ((bool)(resources.GetObject("repositoryItemTextEdit1.Mask.ShowPlaceHolders")));
            this.repositoryItemTextEdit1.Mask.UseMaskAsDisplayFormat = ((bool)(resources.GetObject("repositoryItemTextEdit1.Mask.UseMaskAsDisplayFormat")));
            this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1";
            // 
            // label1
            // 
            resources.ApplyResources(this.label1, "label1");
            this.ep.SetError(this.label1, resources.GetString("label1.Error"));
            this.ep.SetIconAlignment(this.label1, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label1.IconAlignment"))));
            this.ep.SetIconPadding(this.label1, ((int)(resources.GetObject("label1.IconPadding"))));
            this.label1.Name = "label1";
            this.toolTip1.SetToolTip(this.label1, resources.GetString("label1.ToolTip"));
            // 
            // label2
            // 
            resources.ApplyResources(this.label2, "label2");
            this.ep.SetError(this.label2, resources.GetString("label2.Error"));
            this.ep.SetIconAlignment(this.label2, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label2.IconAlignment"))));
            this.ep.SetIconPadding(this.label2, ((int)(resources.GetObject("label2.IconPadding"))));
            this.label2.Name = "label2";
            this.toolTip1.SetToolTip(this.label2, resources.GetString("label2.ToolTip"));
            // 
            // txtHoTenNguoiNopTien
            // 
            resources.ApplyResources(this.txtHoTenNguoiNopTien, "txtHoTenNguoiNopTien");
            this.ep.SetError(this.txtHoTenNguoiNopTien, resources.GetString("txtHoTenNguoiNopTien.Error"));
            this.ep.SetIconAlignment(this.txtHoTenNguoiNopTien, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtHoTenNguoiNopTien.IconAlignment"))));
            this.ep.SetIconPadding(this.txtHoTenNguoiNopTien, ((int)(resources.GetObject("txtHoTenNguoiNopTien.IconPadding"))));
            this.txtHoTenNguoiNopTien.Name = "txtHoTenNguoiNopTien";
            this.toolTip1.SetToolTip(this.txtHoTenNguoiNopTien, resources.GetString("txtHoTenNguoiNopTien.ToolTip"));
            // 
            // label3
            // 
            resources.ApplyResources(this.label3, "label3");
            this.ep.SetError(this.label3, resources.GetString("label3.Error"));
            this.ep.SetIconAlignment(this.label3, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label3.IconAlignment"))));
            this.ep.SetIconPadding(this.label3, ((int)(resources.GetObject("label3.IconPadding"))));
            this.label3.Name = "label3";
            this.toolTip1.SetToolTip(this.label3, resources.GetString("label3.ToolTip"));
            // 
            // txtDienGiai
            // 
            resources.ApplyResources(this.txtDienGiai, "txtDienGiai");
            this.ep.SetError(this.txtDienGiai, resources.GetString("txtDienGiai.Error"));
            this.ep.SetIconAlignment(this.txtDienGiai, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtDienGiai.IconAlignment"))));
            this.ep.SetIconPadding(this.txtDienGiai, ((int)(resources.GetObject("txtDienGiai.IconPadding"))));
            this.txtDienGiai.Name = "txtDienGiai";
            this.txtDienGiai.Tag = "<LyDoThu> của <TenDonVi>";
            this.toolTip1.SetToolTip(this.txtDienGiai, resources.GetString("txtDienGiai.ToolTip"));
            // 
            // label8
            // 
            resources.ApplyResources(this.label8, "label8");
            this.ep.SetError(this.label8, resources.GetString("label8.Error"));
            this.ep.SetIconAlignment(this.label8, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label8.IconAlignment"))));
            this.ep.SetIconPadding(this.label8, ((int)(resources.GetObject("label8.IconPadding"))));
            this.label8.Name = "label8";
            this.toolTip1.SetToolTip(this.label8, resources.GetString("label8.ToolTip"));
            // 
            // txtSoChungTu
            // 
            resources.ApplyResources(this.txtSoChungTu, "txtSoChungTu");
            this.ep.SetError(this.txtSoChungTu, resources.GetString("txtSoChungTu.Error"));
            this.txtSoChungTu.ForeColor = System.Drawing.Color.ForestGreen;
            this.ep.SetIconAlignment(this.txtSoChungTu, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoChungTu.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoChungTu, ((int)(resources.GetObject("txtSoChungTu.IconPadding"))));
            this.txtSoChungTu.Name = "txtSoChungTu";
            this.txtSoChungTu.TabStop = false;
            this.toolTip1.SetToolTip(this.txtSoChungTu, resources.GetString("txtSoChungTu.ToolTip"));
            // 
            // label9
            // 
            resources.ApplyResources(this.label9, "label9");
            this.ep.SetError(this.label9, resources.GetString("label9.Error"));
            this.ep.SetIconAlignment(this.label9, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label9.IconAlignment"))));
            this.ep.SetIconPadding(this.label9, ((int)(resources.GetObject("label9.IconPadding"))));
            this.label9.Name = "label9";
            this.toolTip1.SetToolTip(this.label9, resources.GetString("label9.ToolTip"));
            // 
            // label10
            // 
            resources.ApplyResources(this.label10, "label10");
            this.ep.SetError(this.label10, resources.GetString("label10.Error"));
            this.ep.SetIconAlignment(this.label10, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label10.IconAlignment"))));
            this.ep.SetIconPadding(this.label10, ((int)(resources.GetObject("label10.IconPadding"))));
            this.label10.Name = "label10";
            this.toolTip1.SetToolTip(this.label10, resources.GetString("label10.ToolTip"));
            // 
            // cboLyDoThu
            // 
            resources.ApplyResources(this.cboLyDoThu, "cboLyDoThu");
            this.ep.SetError(this.cboLyDoThu, resources.GetString("cboLyDoThu.Error"));
            this.ep.SetIconAlignment(this.cboLyDoThu, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cboLyDoThu.IconAlignment"))));
            this.ep.SetIconPadding(this.cboLyDoThu, ((int)(resources.GetObject("cboLyDoThu.IconPadding"))));
            this.cboLyDoThu.Name = "cboLyDoThu";
            this.toolTip1.SetToolTip(this.cboLyDoThu, resources.GetString("cboLyDoThu.ToolTip"));
            this.cboLyDoThu.SelectedIndexChanged += new System.EventHandler(this.cboLyDoThu_SelectedIndexChanged);
            // 
            // pnlButtons
            // 
            resources.ApplyResources(this.pnlButtons, "pnlButtons");
            this.pnlButtons.Controls.Add(this.cmdModify);
            this.pnlButtons.Controls.Add(this.cmdCancel);
            this.pnlButtons.Controls.Add(this.cmdPrint);
            this.pnlButtons.Controls.Add(this.cmdView);
            this.pnlButtons.Controls.Add(this.cmdDelete);
            this.pnlButtons.Controls.Add(this.cmdAddNew);
            this.pnlButtons.Controls.Add(this.cmdUpdate);
            this.ep.SetError(this.pnlButtons, resources.GetString("pnlButtons.Error"));
            this.ep.SetIconAlignment(this.pnlButtons, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("pnlButtons.IconAlignment"))));
            this.ep.SetIconPadding(this.pnlButtons, ((int)(resources.GetObject("pnlButtons.IconPadding"))));
            this.pnlButtons.Name = "pnlButtons";
            this.toolTip1.SetToolTip(this.pnlButtons, resources.GetString("pnlButtons.ToolTip"));
            // 
            // cmdModify
            // 
            resources.ApplyResources(this.cmdModify, "cmdModify");
            this.cmdModify.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdModify, resources.GetString("cmdModify.Error"));
            this.cmdModify.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdModify, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdModify.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdModify, ((int)(resources.GetObject("cmdModify.IconPadding"))));
            this.cmdModify.Name = "cmdModify";
            this.toolTip1.SetToolTip(this.cmdModify, resources.GetString("cmdModify.ToolTip"));
            this.cmdModify.Click += new System.EventHandler(this.cmdModify_Click);
            // 
            // cmdCancel
            // 
            resources.ApplyResources(this.cmdCancel, "cmdCancel");
            this.cmdCancel.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdCancel, resources.GetString("cmdCancel.Error"));
            this.cmdCancel.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdCancel, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdCancel.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdCancel, ((int)(resources.GetObject("cmdCancel.IconPadding"))));
            this.cmdCancel.Name = "cmdCancel";
            this.toolTip1.SetToolTip(this.cmdCancel, resources.GetString("cmdCancel.ToolTip"));
            this.cmdCancel.Click += new System.EventHandler(this.cmdCancel_Click);
            // 
            // cmdPrint
            // 
            resources.ApplyResources(this.cmdPrint, "cmdPrint");
            this.cmdPrint.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdPrint, resources.GetString("cmdPrint.Error"));
            this.cmdPrint.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdPrint, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdPrint.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdPrint, ((int)(resources.GetObject("cmdPrint.IconPadding"))));
            this.cmdPrint.Name = "cmdPrint";
            this.toolTip1.SetToolTip(this.cmdPrint, resources.GetString("cmdPrint.ToolTip"));
            this.cmdPrint.Click += new System.EventHandler(this.cmdPrint_Click);
            // 
            // cmdView
            // 
            resources.ApplyResources(this.cmdView, "cmdView");
            this.cmdView.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdView, resources.GetString("cmdView.Error"));
            this.cmdView.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdView, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdView.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdView, ((int)(resources.GetObject("cmdView.IconPadding"))));
            this.cmdView.Name = "cmdView";
            this.toolTip1.SetToolTip(this.cmdView, resources.GetString("cmdView.ToolTip"));
            this.cmdView.Click += new System.EventHandler(this.cmdView_Click);
            // 
            // cmdDelete
            // 
            resources.ApplyResources(this.cmdDelete, "cmdDelete");
            this.cmdDelete.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdDelete, resources.GetString("cmdDelete.Error"));
            this.cmdDelete.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdDelete, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdDelete.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdDelete, ((int)(resources.GetObject("cmdDelete.IconPadding"))));
            this.cmdDelete.Name = "cmdDelete";
            this.toolTip1.SetToolTip(this.cmdDelete, resources.GetString("cmdDelete.ToolTip"));
            this.cmdDelete.Click += new System.EventHandler(this.cmdDelete_Click);
            // 
            // cmdAddNew
            // 
            resources.ApplyResources(this.cmdAddNew, "cmdAddNew");
            this.cmdAddNew.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdAddNew, resources.GetString("cmdAddNew.Error"));
            this.cmdAddNew.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdAddNew, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdAddNew.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdAddNew, ((int)(resources.GetObject("cmdAddNew.IconPadding"))));
            this.cmdAddNew.Name = "cmdAddNew";
            this.toolTip1.SetToolTip(this.cmdAddNew, resources.GetString("cmdAddNew.ToolTip"));
            this.cmdAddNew.Click += new System.EventHandler(this.cmdAddNew_Click_1);
            // 
            // cmdUpdate
            // 
            resources.ApplyResources(this.cmdUpdate, "cmdUpdate");
            this.cmdUpdate.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdUpdate, resources.GetString("cmdUpdate.Error"));
            this.cmdUpdate.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdUpdate, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdUpdate.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdUpdate, ((int)(resources.GetObject("cmdUpdate.IconPadding"))));
            this.cmdUpdate.Name = "cmdUpdate";
            this.toolTip1.SetToolTip(this.cmdUpdate, resources.GetString("cmdUpdate.ToolTip"));
            this.cmdUpdate.Click += new System.EventHandler(this.cmdSave_Click);
            // 
            // txtDiaChi
            // 
            resources.ApplyResources(this.txtDiaChi, "txtDiaChi");
            this.ep.SetError(this.txtDiaChi, resources.GetString("txtDiaChi.Error"));
            this.ep.SetIconAlignment(this.txtDiaChi, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtDiaChi.IconAlignment"))));
            this.ep.SetIconPadding(this.txtDiaChi, ((int)(resources.GetObject("txtDiaChi.IconPadding"))));
            this.txtDiaChi.Name = "txtDiaChi";
            this.toolTip1.SetToolTip(this.txtDiaChi, resources.GetString("txtDiaChi.ToolTip"));
            // 
            // label6
            // 
            resources.ApplyResources(this.label6, "label6");
            this.ep.SetError(this.label6, resources.GetString("label6.Error"));
            this.ep.SetIconAlignment(this.label6, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label6.IconAlignment"))));
            this.ep.SetIconPadding(this.label6, ((int)(resources.GetObject("label6.IconPadding"))));
            this.label6.Name = "label6";
            this.toolTip1.SetToolTip(this.label6, resources.GetString("label6.ToolTip"));
            // 
            // txtSoTien
            // 
            resources.ApplyResources(this.txtSoTien, "txtSoTien");
            this.txtSoTien.BackColor = System.Drawing.SystemColors.Info;
            this.ep.SetError(this.txtSoTien, resources.GetString("txtSoTien.Error"));
            this.txtSoTien.ForeColor = System.Drawing.Color.IndianRed;
            this.ep.SetIconAlignment(this.txtSoTien, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoTien.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoTien, ((int)(resources.GetObject("txtSoTien.IconPadding"))));
            this.txtSoTien.Name = "txtSoTien";
            this.txtSoTien.TabStop = false;
            this.toolTip1.SetToolTip(this.txtSoTien, resources.GetString("txtSoTien.ToolTip"));
            // 
            // txtSoHoaDon
            // 
            resources.ApplyResources(this.txtSoHoaDon, "txtSoHoaDon");
            this.ep.SetError(this.txtSoHoaDon, resources.GetString("txtSoHoaDon.Error"));
            this.ep.SetIconAlignment(this.txtSoHoaDon, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoHoaDon.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoHoaDon, ((int)(resources.GetObject("txtSoHoaDon.IconPadding"))));
            this.txtSoHoaDon.Name = "txtSoHoaDon";
            this.toolTip1.SetToolTip(this.txtSoHoaDon, resources.GetString("txtSoHoaDon.ToolTip"));
            // 
            // txtSerialHoaDon
            // 
            resources.ApplyResources(this.txtSerialHoaDon, "txtSerialHoaDon");
            this.ep.SetError(this.txtSerialHoaDon, resources.GetString("txtSerialHoaDon.Error"));
            this.ep.SetIconAlignment(this.txtSerialHoaDon, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSerialHoaDon.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSerialHoaDon, ((int)(resources.GetObject("txtSerialHoaDon.IconPadding"))));
            this.txtSerialHoaDon.Name = "txtSerialHoaDon";
            this.toolTip1.SetToolTip(this.txtSerialHoaDon, resources.GetString("txtSerialHoaDon.ToolTip"));
            // 
            // txtSoDuThangTruoc
            // 
            resources.ApplyResources(this.txtSoDuThangTruoc, "txtSoDuThangTruoc");
            this.txtSoDuThangTruoc.BackColor = System.Drawing.Color.White;
            this.ep.SetError(this.txtSoDuThangTruoc, resources.GetString("txtSoDuThangTruoc.Error"));
            this.txtSoDuThangTruoc.ForeColor = System.Drawing.Color.IndianRed;
            this.ep.SetIconAlignment(this.txtSoDuThangTruoc, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoDuThangTruoc.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoDuThangTruoc, ((int)(resources.GetObject("txtSoDuThangTruoc.IconPadding"))));
            this.txtSoDuThangTruoc.Name = "txtSoDuThangTruoc";
            this.txtSoDuThangTruoc.TabStop = false;
            this.toolTip1.SetToolTip(this.txtSoDuThangTruoc, resources.GetString("txtSoDuThangTruoc.ToolTip"));
            this.txtSoDuThangTruoc.Validated += new System.EventHandler(this.txtSoDuThangTruoc_Validated);
            // 
            // cmdXemTK
            // 
            resources.ApplyResources(this.cmdXemTK, "cmdXemTK");
            this.cmdXemTK.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdXemTK, resources.GetString("cmdXemTK.Error"));
            this.cmdXemTK.ForeColor = System.Drawing.Color.DodgerBlue;
            this.ep.SetIconAlignment(this.cmdXemTK, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdXemTK.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdXemTK, ((int)(resources.GetObject("cmdXemTK.IconPadding"))));
            this.cmdXemTK.Name = "cmdXemTK";
            this.cmdXemTK.TabStop = false;
            this.toolTip1.SetToolTip(this.cmdXemTK, resources.GetString("cmdXemTK.ToolTip"));
            this.cmdXemTK.Click += new System.EventHandler(this.cmdXemTK_Click);
            // 
            // picboxNote
            // 
            resources.ApplyResources(this.picboxNote, "picboxNote");
            this.picboxNote.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.picboxNote, resources.GetString("picboxNote.Error"));
            this.ep.SetIconAlignment(this.picboxNote, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("picboxNote.IconAlignment"))));
            this.ep.SetIconPadding(this.picboxNote, ((int)(resources.GetObject("picboxNote.IconPadding"))));
            this.picboxNote.Name = "picboxNote";
            this.picboxNote.TabStop = false;
            this.toolTip1.SetToolTip(this.picboxNote, resources.GetString("picboxNote.ToolTip"));
            this.picboxNote.Click += new System.EventHandler(this.cmdNote_Click);
            // 
            // picboxHelp
            // 
            resources.ApplyResources(this.picboxHelp, "picboxHelp");
            this.picboxHelp.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.picboxHelp, resources.GetString("picboxHelp.Error"));
            this.ep.SetIconAlignment(this.picboxHelp, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("picboxHelp.IconAlignment"))));
            this.ep.SetIconPadding(this.picboxHelp, ((int)(resources.GetObject("picboxHelp.IconPadding"))));
            this.picboxHelp.Name = "picboxHelp";
            this.picboxHelp.TabStop = false;
            this.toolTip1.SetToolTip(this.picboxHelp, resources.GetString("picboxHelp.ToolTip"));
            this.picboxHelp.Click += new System.EventHandler(this.picboxHelp_Click);
            // 
            // txtSoDuThangNay
            // 
            resources.ApplyResources(this.txtSoDuThangNay, "txtSoDuThangNay");
            this.txtSoDuThangNay.BackColor = System.Drawing.Color.White;
            this.ep.SetError(this.txtSoDuThangNay, resources.GetString("txtSoDuThangNay.Error"));
            this.txtSoDuThangNay.ForeColor = System.Drawing.Color.IndianRed;
            this.ep.SetIconAlignment(this.txtSoDuThangNay, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoDuThangNay.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoDuThangNay, ((int)(resources.GetObject("txtSoDuThangNay.IconPadding"))));
            this.txtSoDuThangNay.Name = "txtSoDuThangNay";
            this.txtSoDuThangNay.TabStop = false;
            this.toolTip1.SetToolTip(this.txtSoDuThangNay, resources.GetString("txtSoDuThangNay.ToolTip"));
            // 
            // txtSoTienThucThu
            // 
            resources.ApplyResources(this.txtSoTienThucThu, "txtSoTienThucThu");
            this.txtSoTienThucThu.BackColor = System.Drawing.Color.White;
            this.ep.SetError(this.txtSoTienThucThu, resources.GetString("txtSoTienThucThu.Error"));
            this.txtSoTienThucThu.ForeColor = System.Drawing.Color.IndianRed;
            this.ep.SetIconAlignment(this.txtSoTienThucThu, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoTienThucThu.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoTienThucThu, ((int)(resources.GetObject("txtSoTienThucThu.IconPadding"))));
            this.txtSoTienThucThu.Name = "txtSoTienThucThu";
            this.txtSoTienThucThu.ReadOnly = true;
            this.toolTip1.SetToolTip(this.txtSoTienThucThu, resources.GetString("txtSoTienThucThu.ToolTip"));
            this.txtSoTienThucThu.Validated += new System.EventHandler(this.txtSoTienThucThu_Validated);
            // 
            // txtMaHocPhi
            // 
            resources.ApplyResources(this.txtMaHocPhi, "txtMaHocPhi");
            this.ep.SetError(this.txtMaHocPhi, resources.GetString("txtMaHocPhi.Error"));
            this.ep.SetIconAlignment(this.txtMaHocPhi, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtMaHocPhi.IconAlignment"))));
            this.ep.SetIconPadding(this.txtMaHocPhi, ((int)(resources.GetObject("txtMaHocPhi.IconPadding"))));
            this.txtMaHocPhi.Name = "txtMaHocPhi";
            this.txtMaHocPhi.TabStop = false;
            this.toolTip1.SetToolTip(this.txtMaHocPhi, resources.GetString("txtMaHocPhi.ToolTip"));
            // 
            // lblStatus
            // 
            resources.ApplyResources(this.lblStatus, "lblStatus");
            this.ep.SetError(this.lblStatus, resources.GetString("lblStatus.Error"));
            this.ep.SetIconAlignment(this.lblStatus, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("lblStatus.IconAlignment"))));
            this.ep.SetIconPadding(this.lblStatus, ((int)(resources.GetObject("lblStatus.IconPadding"))));
            this.lblStatus.Name = "lblStatus";
            this.toolTip1.SetToolTip(this.lblStatus, resources.GetString("lblStatus.ToolTip"));
            // 
            // pnlBottom
            // 
            resources.ApplyResources(this.pnlBottom, "pnlBottom");
            this.pnlBottom.Controls.Add(this.picboxNote);
            this.pnlBottom.Controls.Add(this.picboxHelp);
            this.pnlBottom.Controls.Add(this.lblStatus);
            this.pnlBottom.Controls.Add(this.pnlNevigator);
            this.ep.SetError(this.pnlBottom, resources.GetString("pnlBottom.Error"));
            this.ep.SetIconAlignment(this.pnlBottom, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("pnlBottom.IconAlignment"))));
            this.ep.SetIconPadding(this.pnlBottom, ((int)(resources.GetObject("pnlBottom.IconPadding"))));
            this.pnlBottom.Name = "pnlBottom";
            this.toolTip1.SetToolTip(this.pnlBottom, resources.GetString("pnlBottom.ToolTip"));
            // 
            // pnlNevigator
            // 
            resources.ApplyResources(this.pnlNevigator, "pnlNevigator");
            this.pnlNevigator.Controls.Add(this.cmdMoveFirst);
            this.pnlNevigator.Controls.Add(this.cmdMovePrevious);
            this.pnlNevigator.Controls.Add(this.cmdMoveNext);
            this.pnlNevigator.Controls.Add(this.cmdMoveLast);
            this.pnlNevigator.Controls.Add(this.lblRecordInfo);
            this.ep.SetError(this.pnlNevigator, resources.GetString("pnlNevigator.Error"));
            this.ep.SetIconAlignment(this.pnlNevigator, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("pnlNevigator.IconAlignment"))));
            this.ep.SetIconPadding(this.pnlNevigator, ((int)(resources.GetObject("pnlNevigator.IconPadding"))));
            this.pnlNevigator.Name = "pnlNevigator";
            this.toolTip1.SetToolTip(this.pnlNevigator, resources.GetString("pnlNevigator.ToolTip"));
            // 
            // cmdMoveFirst
            // 
            resources.ApplyResources(this.cmdMoveFirst, "cmdMoveFirst");
            this.cmdMoveFirst.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdMoveFirst, resources.GetString("cmdMoveFirst.Error"));
            this.cmdMoveFirst.ForeColor = System.Drawing.Color.Maroon;
            this.ep.SetIconAlignment(this.cmdMoveFirst, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdMoveFirst.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdMoveFirst, ((int)(resources.GetObject("cmdMoveFirst.IconPadding"))));
            this.cmdMoveFirst.Name = "cmdMoveFirst";
            this.toolTip1.SetToolTip(this.cmdMoveFirst, resources.GetString("cmdMoveFirst.ToolTip"));
            this.cmdMoveFirst.Click += new System.EventHandler(this.cmdMoveFirst_Click);
            // 
            // cmdMovePrevious
            // 
            resources.ApplyResources(this.cmdMovePrevious, "cmdMovePrevious");
            this.cmdMovePrevious.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdMovePrevious, resources.GetString("cmdMovePrevious.Error"));
            this.cmdMovePrevious.ForeColor = System.Drawing.Color.Maroon;
            this.ep.SetIconAlignment(this.cmdMovePrevious, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdMovePrevious.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdMovePrevious, ((int)(resources.GetObject("cmdMovePrevious.IconPadding"))));
            this.cmdMovePrevious.Name = "cmdMovePrevious";
            this.toolTip1.SetToolTip(this.cmdMovePrevious, resources.GetString("cmdMovePrevious.ToolTip"));
            this.cmdMovePrevious.Click += new System.EventHandler(this.cmdMovePrevious_Click);
            // 
            // cmdMoveNext
            // 
            resources.ApplyResources(this.cmdMoveNext, "cmdMoveNext");
            this.cmdMoveNext.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdMoveNext, resources.GetString("cmdMoveNext.Error"));
            this.cmdMoveNext.ForeColor = System.Drawing.Color.Maroon;
            this.ep.SetIconAlignment(this.cmdMoveNext, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdMoveNext.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdMoveNext, ((int)(resources.GetObject("cmdMoveNext.IconPadding"))));
            this.cmdMoveNext.Name = "cmdMoveNext";
            this.toolTip1.SetToolTip(this.cmdMoveNext, resources.GetString("cmdMoveNext.ToolTip"));
            this.cmdMoveNext.Click += new System.EventHandler(this.cmdMoveNext_Click);
            // 
            // cmdMoveLast
            // 
            resources.ApplyResources(this.cmdMoveLast, "cmdMoveLast");
            this.cmdMoveLast.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.cmdMoveLast, resources.GetString("cmdMoveLast.Error"));
            this.cmdMoveLast.ForeColor = System.Drawing.Color.Maroon;
            this.ep.SetIconAlignment(this.cmdMoveLast, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cmdMoveLast.IconAlignment"))));
            this.ep.SetIconPadding(this.cmdMoveLast, ((int)(resources.GetObject("cmdMoveLast.IconPadding"))));
            this.cmdMoveLast.Name = "cmdMoveLast";
            this.toolTip1.SetToolTip(this.cmdMoveLast, resources.GetString("cmdMoveLast.ToolTip"));
            this.cmdMoveLast.Click += new System.EventHandler(this.cmdMoveLast_Click);
            // 
            // lblRecordInfo
            // 
            resources.ApplyResources(this.lblRecordInfo, "lblRecordInfo");
            this.lblRecordInfo.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.ep.SetError(this.lblRecordInfo, resources.GetString("lblRecordInfo.Error"));
            this.ep.SetIconAlignment(this.lblRecordInfo, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("lblRecordInfo.IconAlignment"))));
            this.ep.SetIconPadding(this.lblRecordInfo, ((int)(resources.GetObject("lblRecordInfo.IconPadding"))));
            this.lblRecordInfo.Name = "lblRecordInfo";
            this.toolTip1.SetToolTip(this.lblRecordInfo, resources.GetString("lblRecordInfo.ToolTip"));
            // 
            // txtNgayChungTu
            // 
            resources.ApplyResources(this.txtNgayChungTu, "txtNgayChungTu");
            this.txtNgayChungTu.ClearTime = false;
            this.txtNgayChungTu.DateDelimiter = "/";
            this.txtNgayChungTu.DateInputFormat = CNCSoft.EUtilities.DateFormat.DDMMYYYY;
            this.txtNgayChungTu.DateOutputFormat = CNCSoft.EUtilities.DateFormat.DDMMYYYY;
            this.ep.SetError(this.txtNgayChungTu, resources.GetString("txtNgayChungTu.Error"));
            this.txtNgayChungTu.FieldReference = null;
            this.ep.SetIconAlignment(this.txtNgayChungTu, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtNgayChungTu.IconAlignment"))));
            this.ep.SetIconPadding(this.txtNgayChungTu, ((int)(resources.GetObject("txtNgayChungTu.IconPadding"))));
            this.txtNgayChungTu.MaskEdit = "";
            this.txtNgayChungTu.MessageLanguage = CNCSoft.EWinform.ValidText.MessageLanguages.Vietnamese;
            this.txtNgayChungTu.Name = "txtNgayChungTu";
            this.txtNgayChungTu.RegExPattern = CNCSoft.EWinform.ValidText.RegularExpressionModes.AutomatedDate;
            this.txtNgayChungTu.Required = false;
            this.txtNgayChungTu.ShowErrorIcon = true;
            this.toolTip1.SetToolTip(this.txtNgayChungTu, resources.GetString("txtNgayChungTu.ToolTip"));
            this.txtNgayChungTu.ValidationMode = CNCSoft.EWinform.ValidText.ValidationModes.None;
            this.txtNgayChungTu.ValidText = "0123456789/ ";
            this.txtNgayChungTu.YearPrefix = ((short)(20));
            // 
            // label11
            // 
            resources.ApplyResources(this.label11, "label11");
            this.ep.SetError(this.label11, resources.GetString("label11.Error"));
            this.ep.SetIconAlignment(this.label11, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label11.IconAlignment"))));
            this.ep.SetIconPadding(this.label11, ((int)(resources.GetObject("label11.IconPadding"))));
            this.label11.Name = "label11";
            this.toolTip1.SetToolTip(this.label11, resources.GetString("label11.ToolTip"));
            // 
            // label16
            // 
            resources.ApplyResources(this.label16, "label16");
            this.ep.SetError(this.label16, resources.GetString("label16.Error"));
            this.ep.SetIconAlignment(this.label16, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label16.IconAlignment"))));
            this.ep.SetIconPadding(this.label16, ((int)(resources.GetObject("label16.IconPadding"))));
            this.label16.Name = "label16";
            this.toolTip1.SetToolTip(this.label16, resources.GetString("label16.ToolTip"));
            // 
            // label17
            // 
            resources.ApplyResources(this.label17, "label17");
            this.ep.SetError(this.label17, resources.GetString("label17.Error"));
            this.ep.SetIconAlignment(this.label17, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label17.IconAlignment"))));
            this.ep.SetIconPadding(this.label17, ((int)(resources.GetObject("label17.IconPadding"))));
            this.label17.Name = "label17";
            this.toolTip1.SetToolTip(this.label17, resources.GetString("label17.ToolTip"));
            // 
            // txtNgayHoaDon
            // 
            resources.ApplyResources(this.txtNgayHoaDon, "txtNgayHoaDon");
            this.txtNgayHoaDon.ClearTime = false;
            this.txtNgayHoaDon.DateDelimiter = "/";
            this.txtNgayHoaDon.DateInputFormat = CNCSoft.EUtilities.DateFormat.DDMMYYYY;
            this.txtNgayHoaDon.DateOutputFormat = CNCSoft.EUtilities.DateFormat.DDMMYYYY;
            this.ep.SetError(this.txtNgayHoaDon, resources.GetString("txtNgayHoaDon.Error"));
            this.txtNgayHoaDon.FieldReference = null;
            this.ep.SetIconAlignment(this.txtNgayHoaDon, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtNgayHoaDon.IconAlignment"))));
            this.ep.SetIconPadding(this.txtNgayHoaDon, ((int)(resources.GetObject("txtNgayHoaDon.IconPadding"))));
            this.txtNgayHoaDon.MaskEdit = "";
            this.txtNgayHoaDon.MessageLanguage = CNCSoft.EWinform.ValidText.MessageLanguages.Vietnamese;
            this.txtNgayHoaDon.Name = "txtNgayHoaDon";
            this.txtNgayHoaDon.RegExPattern = CNCSoft.EWinform.ValidText.RegularExpressionModes.AutomatedDate;
            this.txtNgayHoaDon.Required = false;
            this.txtNgayHoaDon.ShowErrorIcon = true;
            this.toolTip1.SetToolTip(this.txtNgayHoaDon, resources.GetString("txtNgayHoaDon.ToolTip"));
            this.txtNgayHoaDon.ValidationMode = CNCSoft.EWinform.ValidText.ValidationModes.None;
            this.txtNgayHoaDon.ValidText = "0123456789/ ";
            this.txtNgayHoaDon.YearPrefix = ((short)(20));
            // 
            // label18
            // 
            resources.ApplyResources(this.label18, "label18");
            this.ep.SetError(this.label18, resources.GetString("label18.Error"));
            this.ep.SetIconAlignment(this.label18, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label18.IconAlignment"))));
            this.ep.SetIconPadding(this.label18, ((int)(resources.GetObject("label18.IconPadding"))));
            this.label18.Name = "label18";
            this.toolTip1.SetToolTip(this.label18, resources.GetString("label18.ToolTip"));
            // 
            // lstAddnew
            // 
            resources.ApplyResources(this.lstAddnew, "lstAddnew");
            this.lstAddnew.BackColor = System.Drawing.SystemColors.Info;
            this.lstAddnew.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.lstAddnew.Cursor = System.Windows.Forms.Cursors.Hand;
            this.ep.SetError(this.lstAddnew, resources.GetString("lstAddnew.Error"));
            this.lstAddnew.FormattingEnabled = true;
            this.ep.SetIconAlignment(this.lstAddnew, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("lstAddnew.IconAlignment"))));
            this.ep.SetIconPadding(this.lstAddnew, ((int)(resources.GetObject("lstAddnew.IconPadding"))));
            this.lstAddnew.Name = "lstAddnew";
            this.lstAddnew.TabStop = false;
            this.toolTip1.SetToolTip(this.lstAddnew, resources.GetString("lstAddnew.ToolTip"));
            this.lstAddnew.SelectedIndexChanged += new System.EventHandler(this.lstAddnew_SelectedIndexChanged);
            this.lstAddnew.Leave += new System.EventHandler(this.lstAddnew_Leave);
            // 
            // label4
            // 
            resources.ApplyResources(this.label4, "label4");
            this.ep.SetError(this.label4, resources.GetString("label4.Error"));
            this.ep.SetIconAlignment(this.label4, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label4.IconAlignment"))));
            this.ep.SetIconPadding(this.label4, ((int)(resources.GetObject("label4.IconPadding"))));
            this.label4.Name = "label4";
            this.toolTip1.SetToolTip(this.label4, resources.GetString("label4.ToolTip"));
            // 
            // cboNganHang
            // 
            resources.ApplyResources(this.cboNganHang, "cboNganHang");
            this.ep.SetError(this.cboNganHang, resources.GetString("cboNganHang.Error"));
            this.ep.SetIconAlignment(this.cboNganHang, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cboNganHang.IconAlignment"))));
            this.ep.SetIconPadding(this.cboNganHang, ((int)(resources.GetObject("cboNganHang.IconPadding"))));
            this.cboNganHang.Name = "cboNganHang";
            this.toolTip1.SetToolTip(this.cboNganHang, resources.GetString("cboNganHang.ToolTip"));
            this.cboNganHang.SelectedIndexChanged += new System.EventHandler(this.cboNganHang_SelectedIndexChanged);
            // 
            // lblSoGiayBaoHP
            // 
            resources.ApplyResources(this.lblSoGiayBaoHP, "lblSoGiayBaoHP");
            this.lblSoGiayBaoHP.Cursor = System.Windows.Forms.Cursors.Default;
            this.ep.SetError(this.lblSoGiayBaoHP, resources.GetString("lblSoGiayBaoHP.Error"));
            this.ep.SetIconAlignment(this.lblSoGiayBaoHP, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("lblSoGiayBaoHP.IconAlignment"))));
            this.ep.SetIconPadding(this.lblSoGiayBaoHP, ((int)(resources.GetObject("lblSoGiayBaoHP.IconPadding"))));
            this.lblSoGiayBaoHP.Name = "lblSoGiayBaoHP";
            this.toolTip1.SetToolTip(this.lblSoGiayBaoHP, resources.GetString("lblSoGiayBaoHP.ToolTip"));
            // 
            // gridLookUpEdit_txtMaHocSinh
            // 
            resources.ApplyResources(this.gridLookUpEdit_txtMaHocSinh, "gridLookUpEdit_txtMaHocSinh");
            this.gridLookUpEdit_txtMaHocSinh.Cursor = System.Windows.Forms.Cursors.Default;
            this.ep.SetError(this.gridLookUpEdit_txtMaHocSinh, resources.GetString("gridLookUpEdit_txtMaHocSinh.Error"));
            this.ep.SetIconAlignment(this.gridLookUpEdit_txtMaHocSinh, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.IconAlignment"))));
            this.ep.SetIconPadding(this.gridLookUpEdit_txtMaHocSinh, ((int)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.IconPadding"))));
            this.gridLookUpEdit_txtMaHocSinh.Name = "gridLookUpEdit_txtMaHocSinh";
            this.gridLookUpEdit_txtMaHocSinh.Properties.AccessibleDescription = resources.GetString("gridLookUpEdit_txtMaHocSinh.Properties.AccessibleDescription");
            this.gridLookUpEdit_txtMaHocSinh.Properties.AccessibleName = resources.GetString("gridLookUpEdit_txtMaHocSinh.Properties.AccessibleName");
            this.gridLookUpEdit_txtMaHocSinh.Properties.Appearance.BackColor = ((System.Drawing.Color)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.Appearance.BackColor")));
            this.gridLookUpEdit_txtMaHocSinh.Properties.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.Appearance.Font")));
            this.gridLookUpEdit_txtMaHocSinh.Properties.Appearance.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.Appearance.GradientMode")));
            this.gridLookUpEdit_txtMaHocSinh.Properties.Appearance.Image = ((System.Drawing.Image)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.Appearance.Image")));
            this.gridLookUpEdit_txtMaHocSinh.Properties.Appearance.Options.UseBackColor = true;
            this.gridLookUpEdit_txtMaHocSinh.Properties.Appearance.Options.UseFont = true;
            this.gridLookUpEdit_txtMaHocSinh.Properties.AutoHeight = ((bool)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.AutoHeight")));
            this.gridLookUpEdit_txtMaHocSinh.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFit;
            this.gridLookUpEdit_txtMaHocSinh.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(((DevExpress.XtraEditors.Controls.ButtonPredefines)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.Buttons"))))});
            this.gridLookUpEdit_txtMaHocSinh.Properties.DisplayMember = "TenDoiTac";
            this.gridLookUpEdit_txtMaHocSinh.Properties.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Style3D;
            this.gridLookUpEdit_txtMaHocSinh.Properties.LookAndFeel.UseDefaultLookAndFeel = false;
            this.gridLookUpEdit_txtMaHocSinh.Properties.NullText = resources.GetString("gridLookUpEdit_txtMaHocSinh.Properties.NullText");
            this.gridLookUpEdit_txtMaHocSinh.Properties.NullValuePrompt = resources.GetString("gridLookUpEdit_txtMaHocSinh.Properties.NullValuePrompt");
            this.gridLookUpEdit_txtMaHocSinh.Properties.NullValuePromptShowForEmptyValue = ((bool)(resources.GetObject("gridLookUpEdit_txtMaHocSinh.Properties.NullValuePromptShowForEmptyValue")));
            this.gridLookUpEdit_txtMaHocSinh.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
            this.gridLookUpEdit_txtMaHocSinh.Properties.ValueMember = "MaDoiTac";
            this.gridLookUpEdit_txtMaHocSinh.Properties.View = this.gridLookUpEdit_txtMaHocSinhView;
            this.toolTip1.SetToolTip(this.gridLookUpEdit_txtMaHocSinh, resources.GetString("gridLookUpEdit_txtMaHocSinh.ToolTip"));
            this.gridLookUpEdit_txtMaHocSinh.EditValueChanged += new System.EventHandler(this.gridLookUpEdit_txtMaHocSinh_EditValueChanged);
            // 
            // gridLookUpEdit_txtMaHocSinhView
            // 
            resources.ApplyResources(this.gridLookUpEdit_txtMaHocSinhView, "gridLookUpEdit_txtMaHocSinhView");
            this.gridLookUpEdit_txtMaHocSinhView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn_MaDoiTac,
            this.gridColumn_TenDoiTac,
            this.gridColumn_Lop,
            this.gridColumn_CheDo});
            this.gridLookUpEdit_txtMaHocSinhView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
            styleFormatCondition4.Appearance.BackColor = ((System.Drawing.Color)(resources.GetObject("resource.BackColor1")));
            styleFormatCondition4.Appearance.BackColor2 = ((System.Drawing.Color)(resources.GetObject("resource.BackColor21")));
            styleFormatCondition4.Appearance.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("resource.GradientMode1")));
            styleFormatCondition4.Appearance.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image1")));
            styleFormatCondition4.Appearance.Options.UseBackColor = true;
            styleFormatCondition4.Column = this.gridColumn_CheDo;
            styleFormatCondition4.Condition = DevExpress.XtraGrid.FormatConditionEnum.Equal;
            styleFormatCondition4.Value1 = "\"NT\"";
            styleFormatCondition4.Value2 = "\"BA\"";
            this.gridLookUpEdit_txtMaHocSinhView.FormatConditions.AddRange(new DevExpress.XtraGrid.StyleFormatCondition[] {
            styleFormatCondition4});
            this.gridLookUpEdit_txtMaHocSinhView.Name = "gridLookUpEdit_txtMaHocSinhView";
            this.gridLookUpEdit_txtMaHocSinhView.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.gridLookUpEdit_txtMaHocSinhView.OptionsView.ShowAutoFilterRow = true;
            this.gridLookUpEdit_txtMaHocSinhView.OptionsView.ShowGroupPanel = false;
            // 
            // gridColumn_MaDoiTac
            // 
            resources.ApplyResources(this.gridColumn_MaDoiTac, "gridColumn_MaDoiTac");
            this.gridColumn_MaDoiTac.FieldName = "MaDoiTac";
            this.gridColumn_MaDoiTac.Name = "gridColumn_MaDoiTac";
            // 
            // gridColumn_TenDoiTac
            // 
            resources.ApplyResources(this.gridColumn_TenDoiTac, "gridColumn_TenDoiTac");
            this.gridColumn_TenDoiTac.FieldName = "TenDoiTac";
            this.gridColumn_TenDoiTac.Name = "gridColumn_TenDoiTac";
            // 
            // gridColumn_Lop
            // 
            resources.ApplyResources(this.gridColumn_Lop, "gridColumn_Lop");
            this.gridColumn_Lop.FieldName = "MaLop";
            this.gridColumn_Lop.Name = "gridColumn_Lop";
            // 
            // txtMaNienHoc
            // 
            resources.ApplyResources(this.txtMaNienHoc, "txtMaNienHoc");
            this.ep.SetError(this.txtMaNienHoc, resources.GetString("txtMaNienHoc.Error"));
            this.ep.SetIconAlignment(this.txtMaNienHoc, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtMaNienHoc.IconAlignment"))));
            this.ep.SetIconPadding(this.txtMaNienHoc, ((int)(resources.GetObject("txtMaNienHoc.IconPadding"))));
            this.txtMaNienHoc.Name = "txtMaNienHoc";
            this.toolTip1.SetToolTip(this.txtMaNienHoc, resources.GetString("txtMaNienHoc.ToolTip"));
            this.txtMaNienHoc.TextChanged += new System.EventHandler(this.txtMaNienHoc_TextChanged);
            // 
            // label7
            // 
            resources.ApplyResources(this.label7, "label7");
            this.ep.SetError(this.label7, resources.GetString("label7.Error"));
            this.ep.SetIconAlignment(this.label7, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label7.IconAlignment"))));
            this.ep.SetIconPadding(this.label7, ((int)(resources.GetObject("label7.IconPadding"))));
            this.label7.Name = "label7";
            this.toolTip1.SetToolTip(this.label7, resources.GetString("label7.ToolTip"));
            // 
            // label12
            // 
            resources.ApplyResources(this.label12, "label12");
            this.ep.SetError(this.label12, resources.GetString("label12.Error"));
            this.ep.SetIconAlignment(this.label12, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label12.IconAlignment"))));
            this.ep.SetIconPadding(this.label12, ((int)(resources.GetObject("label12.IconPadding"))));
            this.label12.Name = "label12";
            this.toolTip1.SetToolTip(this.label12, resources.GetString("label12.ToolTip"));
            // 
            // cboLop
            // 
            resources.ApplyResources(this.cboLop, "cboLop");
            this.ep.SetError(this.cboLop, resources.GetString("cboLop.Error"));
            this.cboLop.FormattingEnabled = true;
            this.ep.SetIconAlignment(this.cboLop, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("cboLop.IconAlignment"))));
            this.ep.SetIconPadding(this.cboLop, ((int)(resources.GetObject("cboLop.IconPadding"))));
            this.cboLop.Name = "cboLop";
            this.toolTip1.SetToolTip(this.cboLop, resources.GetString("cboLop.ToolTip"));
            this.cboLop.SelectedIndexChanged += new System.EventHandler(this.cboLop_SelectedIndexChanged);
            // 
            // label14
            // 
            resources.ApplyResources(this.label14, "label14");
            this.ep.SetError(this.label14, resources.GetString("label14.Error"));
            this.ep.SetIconAlignment(this.label14, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label14.IconAlignment"))));
            this.ep.SetIconPadding(this.label14, ((int)(resources.GetObject("label14.IconPadding"))));
            this.label14.Name = "label14";
            this.toolTip1.SetToolTip(this.label14, resources.GetString("label14.ToolTip"));
            // 
            // txtSoInvoice
            // 
            resources.ApplyResources(this.txtSoInvoice, "txtSoInvoice");
            this.txtSoInvoice.Cursor = System.Windows.Forms.Cursors.Default;
            this.ep.SetError(this.txtSoInvoice, resources.GetString("txtSoInvoice.Error"));
            this.ep.SetIconAlignment(this.txtSoInvoice, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtSoInvoice.IconAlignment"))));
            this.ep.SetIconPadding(this.txtSoInvoice, ((int)(resources.GetObject("txtSoInvoice.IconPadding"))));
            this.txtSoInvoice.Name = "txtSoInvoice";
            this.txtSoInvoice.Properties.AccessibleDescription = resources.GetString("txtSoInvoice.Properties.AccessibleDescription");
            this.txtSoInvoice.Properties.AccessibleName = resources.GetString("txtSoInvoice.Properties.AccessibleName");
            this.txtSoInvoice.Properties.Appearance.BackColor = ((System.Drawing.Color)(resources.GetObject("txtSoInvoice.Properties.Appearance.BackColor")));
            this.txtSoInvoice.Properties.Appearance.Font = ((System.Drawing.Font)(resources.GetObject("txtSoInvoice.Properties.Appearance.Font")));
            this.txtSoInvoice.Properties.Appearance.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("txtSoInvoice.Properties.Appearance.GradientMode")));
            this.txtSoInvoice.Properties.Appearance.Image = ((System.Drawing.Image)(resources.GetObject("txtSoInvoice.Properties.Appearance.Image")));
            this.txtSoInvoice.Properties.Appearance.Options.UseBackColor = true;
            this.txtSoInvoice.Properties.Appearance.Options.UseFont = true;
            this.txtSoInvoice.Properties.AutoHeight = ((bool)(resources.GetObject("txtSoInvoice.Properties.AutoHeight")));
            this.txtSoInvoice.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFit;
            this.txtSoInvoice.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(((DevExpress.XtraEditors.Controls.ButtonPredefines)(resources.GetObject("txtSoInvoice.Properties.Buttons"))))});
            this.txtSoInvoice.Properties.DisplayMember = "SoChungTu";
            this.txtSoInvoice.Properties.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Style3D;
            this.txtSoInvoice.Properties.LookAndFeel.UseDefaultLookAndFeel = false;
            this.txtSoInvoice.Properties.NullText = resources.GetString("txtSoInvoice.Properties.NullText");
            this.txtSoInvoice.Properties.NullValuePrompt = resources.GetString("txtSoInvoice.Properties.NullValuePrompt");
            this.txtSoInvoice.Properties.NullValuePromptShowForEmptyValue = ((bool)(resources.GetObject("txtSoInvoice.Properties.NullValuePromptShowForEmptyValue")));
            this.txtSoInvoice.Properties.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains;
            this.txtSoInvoice.Properties.ValueMember = "SoChungTu";
            this.txtSoInvoice.Properties.View = this.gridView1;
            this.toolTip1.SetToolTip(this.txtSoInvoice, resources.GetString("txtSoInvoice.ToolTip"));
            this.txtSoInvoice.EditValueChanged += new System.EventHandler(this.txtSoInvoice_EditValueChanged);
            this.txtSoInvoice.Validated += new System.EventHandler(this.txtSoInvoice_Validated);
            // 
            // gridView1
            // 
            resources.ApplyResources(this.gridView1, "gridView1");
            this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn_SoChungTu,
            this.gridColumn_HoTen,
            this.gridColumn_SoTien});
            this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
            styleFormatCondition3.Appearance.BackColor = ((System.Drawing.Color)(resources.GetObject("resource.BackColor")));
            styleFormatCondition3.Appearance.BackColor2 = ((System.Drawing.Color)(resources.GetObject("resource.BackColor2")));
            styleFormatCondition3.Appearance.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("resource.GradientMode")));
            styleFormatCondition3.Appearance.Image = ((System.Drawing.Image)(resources.GetObject("resource.Image")));
            styleFormatCondition3.Appearance.Options.UseBackColor = true;
            styleFormatCondition3.Condition = DevExpress.XtraGrid.FormatConditionEnum.Equal;
            styleFormatCondition3.Value1 = "\"NT\"";
            styleFormatCondition3.Value2 = "\"BA\"";
            this.gridView1.FormatConditions.AddRange(new DevExpress.XtraGrid.StyleFormatCondition[] {
            styleFormatCondition3});
            this.gridView1.Name = "gridView1";
            this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            // 
            // gridColumn_SoChungTu
            // 
            resources.ApplyResources(this.gridColumn_SoChungTu, "gridColumn_SoChungTu");
            this.gridColumn_SoChungTu.FieldName = "SoChungTu";
            this.gridColumn_SoChungTu.Name = "gridColumn_SoChungTu";
            // 
            // gridColumn_HoTen
            // 
            resources.ApplyResources(this.gridColumn_HoTen, "gridColumn_HoTen");
            this.gridColumn_HoTen.FieldName = "HoTen";
            this.gridColumn_HoTen.Name = "gridColumn_HoTen";
            // 
            // gridColumn_SoTien
            // 
            resources.ApplyResources(this.gridColumn_SoTien, "gridColumn_SoTien");
            this.gridColumn_SoTien.ColumnEdit = this.repositoryItemTextEdit1;
            this.gridColumn_SoTien.FieldName = "TongTien";
            this.gridColumn_SoTien.Name = "gridColumn_SoTien";
            // 
            // dgridChiTietPT
            // 
            resources.ApplyResources(this.dgridChiTietPT, "dgridChiTietPT");
            this.dgridChiTietPT.EmbeddedNavigator.AccessibleDescription = resources.GetString("dgridChiTietPT.EmbeddedNavigator.AccessibleDescription");
            this.dgridChiTietPT.EmbeddedNavigator.AccessibleName = resources.GetString("dgridChiTietPT.EmbeddedNavigator.AccessibleName");
            this.dgridChiTietPT.EmbeddedNavigator.AllowHtmlTextInToolTip = ((DevExpress.Utils.DefaultBoolean)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.AllowHtmlTextInToolTip")));
            this.dgridChiTietPT.EmbeddedNavigator.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.Anchor")));
            this.dgridChiTietPT.EmbeddedNavigator.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.BackgroundImage")));
            this.dgridChiTietPT.EmbeddedNavigator.BackgroundImageLayout = ((System.Windows.Forms.ImageLayout)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.BackgroundImageLayout")));
            this.dgridChiTietPT.EmbeddedNavigator.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.ImeMode")));
            this.dgridChiTietPT.EmbeddedNavigator.TextLocation = ((DevExpress.XtraEditors.NavigatorButtonsTextLocation)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.TextLocation")));
            this.dgridChiTietPT.EmbeddedNavigator.ToolTip = resources.GetString("dgridChiTietPT.EmbeddedNavigator.ToolTip");
            this.dgridChiTietPT.EmbeddedNavigator.ToolTipIconType = ((DevExpress.Utils.ToolTipIconType)(resources.GetObject("dgridChiTietPT.EmbeddedNavigator.ToolTipIconType")));
            this.dgridChiTietPT.EmbeddedNavigator.ToolTipTitle = resources.GetString("dgridChiTietPT.EmbeddedNavigator.ToolTipTitle");
            this.ep.SetError(this.dgridChiTietPT, resources.GetString("dgridChiTietPT.Error"));
            this.ep.SetIconAlignment(this.dgridChiTietPT, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("dgridChiTietPT.IconAlignment"))));
            this.ep.SetIconPadding(this.dgridChiTietPT, ((int)(resources.GetObject("dgridChiTietPT.IconPadding"))));
            this.dgridChiTietPT.MainView = this.gridView2;
            this.dgridChiTietPT.Name = "dgridChiTietPT";
            this.dgridChiTietPT.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
            this.repositoryItemCalcEdit_SoLuong,
            this.repositoryItemTextEdit_So,
            this.repositoryItemLookUpEdit_TaiKhoan,
            this.repositoryItemTextEdit_NhapSoLuong});
            this.toolTip1.SetToolTip(this.dgridChiTietPT, resources.GetString("dgridChiTietPT.ToolTip"));
            this.dgridChiTietPT.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView2});
            // 
            // gridView2
            // 
            this.gridView2.Appearance.ColumnFilterButton.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.ColumnFilterButton.BackColor")));
            this.gridView2.Appearance.ColumnFilterButton.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.ColumnFilterButton.BorderColor")));
            this.gridView2.Appearance.ColumnFilterButton.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.ColumnFilterButton.ForeColor")));
            this.gridView2.Appearance.ColumnFilterButton.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.ColumnFilterButton.GradientMode")));
            this.gridView2.Appearance.ColumnFilterButton.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.ColumnFilterButton.Image")));
            this.gridView2.Appearance.ColumnFilterButton.Options.UseBackColor = true;
            this.gridView2.Appearance.ColumnFilterButton.Options.UseBorderColor = true;
            this.gridView2.Appearance.ColumnFilterButton.Options.UseForeColor = true;
            this.gridView2.Appearance.ColumnFilterButtonActive.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.ColumnFilterButtonActive.BackColor")));
            this.gridView2.Appearance.ColumnFilterButtonActive.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.ColumnFilterButtonActive.BorderColor")));
            this.gridView2.Appearance.ColumnFilterButtonActive.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.ColumnFilterButtonActive.ForeColor")));
            this.gridView2.Appearance.ColumnFilterButtonActive.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.ColumnFilterButtonActive.GradientMode")));
            this.gridView2.Appearance.ColumnFilterButtonActive.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.ColumnFilterButtonActive.Image")));
            this.gridView2.Appearance.ColumnFilterButtonActive.Options.UseBackColor = true;
            this.gridView2.Appearance.ColumnFilterButtonActive.Options.UseBorderColor = true;
            this.gridView2.Appearance.ColumnFilterButtonActive.Options.UseForeColor = true;
            this.gridView2.Appearance.Empty.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.Empty.BackColor")));
            this.gridView2.Appearance.Empty.BackColor2 = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.Empty.BackColor2")));
            this.gridView2.Appearance.Empty.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.Empty.GradientMode")));
            this.gridView2.Appearance.Empty.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.Empty.Image")));
            this.gridView2.Appearance.Empty.Options.UseBackColor = true;
            this.gridView2.Appearance.EvenRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.EvenRow.BackColor")));
            this.gridView2.Appearance.EvenRow.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.EvenRow.BorderColor")));
            this.gridView2.Appearance.EvenRow.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.EvenRow.ForeColor")));
            this.gridView2.Appearance.EvenRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.EvenRow.GradientMode")));
            this.gridView2.Appearance.EvenRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.EvenRow.Image")));
            this.gridView2.Appearance.EvenRow.Options.UseBackColor = true;
            this.gridView2.Appearance.EvenRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.EvenRow.Options.UseForeColor = true;
            this.gridView2.Appearance.FilterCloseButton.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FilterCloseButton.BackColor")));
            this.gridView2.Appearance.FilterCloseButton.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FilterCloseButton.BorderColor")));
            this.gridView2.Appearance.FilterCloseButton.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FilterCloseButton.ForeColor")));
            this.gridView2.Appearance.FilterCloseButton.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.FilterCloseButton.GradientMode")));
            this.gridView2.Appearance.FilterCloseButton.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.FilterCloseButton.Image")));
            this.gridView2.Appearance.FilterCloseButton.Options.UseBackColor = true;
            this.gridView2.Appearance.FilterCloseButton.Options.UseBorderColor = true;
            this.gridView2.Appearance.FilterCloseButton.Options.UseForeColor = true;
            this.gridView2.Appearance.FilterPanel.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FilterPanel.BackColor")));
            this.gridView2.Appearance.FilterPanel.BackColor2 = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FilterPanel.BackColor2")));
            this.gridView2.Appearance.FilterPanel.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FilterPanel.ForeColor")));
            this.gridView2.Appearance.FilterPanel.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.FilterPanel.GradientMode")));
            this.gridView2.Appearance.FilterPanel.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.FilterPanel.Image")));
            this.gridView2.Appearance.FilterPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.FilterPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.FixedLine.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FixedLine.BackColor")));
            this.gridView2.Appearance.FixedLine.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.FixedLine.GradientMode")));
            this.gridView2.Appearance.FixedLine.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.FixedLine.Image")));
            this.gridView2.Appearance.FixedLine.Options.UseBackColor = true;
            this.gridView2.Appearance.FocusedCell.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FocusedCell.BackColor")));
            this.gridView2.Appearance.FocusedCell.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FocusedCell.ForeColor")));
            this.gridView2.Appearance.FocusedCell.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.FocusedCell.GradientMode")));
            this.gridView2.Appearance.FocusedCell.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.FocusedCell.Image")));
            this.gridView2.Appearance.FocusedCell.Options.UseBackColor = true;
            this.gridView2.Appearance.FocusedCell.Options.UseForeColor = true;
            this.gridView2.Appearance.FocusedRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FocusedRow.BackColor")));
            this.gridView2.Appearance.FocusedRow.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FocusedRow.BorderColor")));
            this.gridView2.Appearance.FocusedRow.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FocusedRow.ForeColor")));
            this.gridView2.Appearance.FocusedRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.FocusedRow.GradientMode")));
            this.gridView2.Appearance.FocusedRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.FocusedRow.Image")));
            this.gridView2.Appearance.FocusedRow.Options.UseBackColor = true;
            this.gridView2.Appearance.FocusedRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.FocusedRow.Options.UseForeColor = true;
            this.gridView2.Appearance.FooterPanel.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FooterPanel.BackColor")));
            this.gridView2.Appearance.FooterPanel.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FooterPanel.BorderColor")));
            this.gridView2.Appearance.FooterPanel.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.FooterPanel.ForeColor")));
            this.gridView2.Appearance.FooterPanel.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.FooterPanel.GradientMode")));
            this.gridView2.Appearance.FooterPanel.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.FooterPanel.Image")));
            this.gridView2.Appearance.FooterPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.FooterPanel.Options.UseBorderColor = true;
            this.gridView2.Appearance.FooterPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.GroupButton.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupButton.BackColor")));
            this.gridView2.Appearance.GroupButton.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupButton.BorderColor")));
            this.gridView2.Appearance.GroupButton.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.GroupButton.GradientMode")));
            this.gridView2.Appearance.GroupButton.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.GroupButton.Image")));
            this.gridView2.Appearance.GroupButton.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupButton.Options.UseBorderColor = true;
            this.gridView2.Appearance.GroupFooter.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupFooter.BackColor")));
            this.gridView2.Appearance.GroupFooter.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupFooter.BorderColor")));
            this.gridView2.Appearance.GroupFooter.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupFooter.ForeColor")));
            this.gridView2.Appearance.GroupFooter.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.GroupFooter.GradientMode")));
            this.gridView2.Appearance.GroupFooter.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.GroupFooter.Image")));
            this.gridView2.Appearance.GroupFooter.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupFooter.Options.UseBorderColor = true;
            this.gridView2.Appearance.GroupFooter.Options.UseForeColor = true;
            this.gridView2.Appearance.GroupPanel.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupPanel.BackColor")));
            this.gridView2.Appearance.GroupPanel.BackColor2 = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupPanel.BackColor2")));
            this.gridView2.Appearance.GroupPanel.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupPanel.ForeColor")));
            this.gridView2.Appearance.GroupPanel.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.GroupPanel.GradientMode")));
            this.gridView2.Appearance.GroupPanel.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.GroupPanel.Image")));
            this.gridView2.Appearance.GroupPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.GroupRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupRow.BackColor")));
            this.gridView2.Appearance.GroupRow.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupRow.BorderColor")));
            this.gridView2.Appearance.GroupRow.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.GroupRow.ForeColor")));
            this.gridView2.Appearance.GroupRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.GroupRow.GradientMode")));
            this.gridView2.Appearance.GroupRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.GroupRow.Image")));
            this.gridView2.Appearance.GroupRow.Options.UseBackColor = true;
            this.gridView2.Appearance.GroupRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.GroupRow.Options.UseForeColor = true;
            this.gridView2.Appearance.HeaderPanel.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HeaderPanel.BackColor")));
            this.gridView2.Appearance.HeaderPanel.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HeaderPanel.BorderColor")));
            this.gridView2.Appearance.HeaderPanel.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HeaderPanel.ForeColor")));
            this.gridView2.Appearance.HeaderPanel.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.HeaderPanel.GradientMode")));
            this.gridView2.Appearance.HeaderPanel.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.HeaderPanel.Image")));
            this.gridView2.Appearance.HeaderPanel.Options.UseBackColor = true;
            this.gridView2.Appearance.HeaderPanel.Options.UseBorderColor = true;
            this.gridView2.Appearance.HeaderPanel.Options.UseForeColor = true;
            this.gridView2.Appearance.HideSelectionRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HideSelectionRow.BackColor")));
            this.gridView2.Appearance.HideSelectionRow.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HideSelectionRow.BorderColor")));
            this.gridView2.Appearance.HideSelectionRow.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HideSelectionRow.ForeColor")));
            this.gridView2.Appearance.HideSelectionRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.HideSelectionRow.GradientMode")));
            this.gridView2.Appearance.HideSelectionRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.HideSelectionRow.Image")));
            this.gridView2.Appearance.HideSelectionRow.Options.UseBackColor = true;
            this.gridView2.Appearance.HideSelectionRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.HideSelectionRow.Options.UseForeColor = true;
            this.gridView2.Appearance.HorzLine.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.HorzLine.BackColor")));
            this.gridView2.Appearance.HorzLine.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.HorzLine.GradientMode")));
            this.gridView2.Appearance.HorzLine.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.HorzLine.Image")));
            this.gridView2.Appearance.HorzLine.Options.UseBackColor = true;
            this.gridView2.Appearance.OddRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.OddRow.BackColor")));
            this.gridView2.Appearance.OddRow.BorderColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.OddRow.BorderColor")));
            this.gridView2.Appearance.OddRow.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.OddRow.ForeColor")));
            this.gridView2.Appearance.OddRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.OddRow.GradientMode")));
            this.gridView2.Appearance.OddRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.OddRow.Image")));
            this.gridView2.Appearance.OddRow.Options.UseBackColor = true;
            this.gridView2.Appearance.OddRow.Options.UseBorderColor = true;
            this.gridView2.Appearance.OddRow.Options.UseForeColor = true;
            this.gridView2.Appearance.Preview.Font = ((System.Drawing.Font)(resources.GetObject("gridView2.Appearance.Preview.Font")));
            this.gridView2.Appearance.Preview.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.Preview.ForeColor")));
            this.gridView2.Appearance.Preview.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.Preview.GradientMode")));
            this.gridView2.Appearance.Preview.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.Preview.Image")));
            this.gridView2.Appearance.Preview.Options.UseFont = true;
            this.gridView2.Appearance.Preview.Options.UseForeColor = true;
            this.gridView2.Appearance.Row.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.Row.BackColor")));
            this.gridView2.Appearance.Row.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.Row.ForeColor")));
            this.gridView2.Appearance.Row.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.Row.GradientMode")));
            this.gridView2.Appearance.Row.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.Row.Image")));
            this.gridView2.Appearance.Row.Options.UseBackColor = true;
            this.gridView2.Appearance.Row.Options.UseForeColor = true;
            this.gridView2.Appearance.RowSeparator.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.RowSeparator.BackColor")));
            this.gridView2.Appearance.RowSeparator.BackColor2 = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.RowSeparator.BackColor2")));
            this.gridView2.Appearance.RowSeparator.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.RowSeparator.GradientMode")));
            this.gridView2.Appearance.RowSeparator.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.RowSeparator.Image")));
            this.gridView2.Appearance.RowSeparator.Options.UseBackColor = true;
            this.gridView2.Appearance.SelectedRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.SelectedRow.BackColor")));
            this.gridView2.Appearance.SelectedRow.ForeColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.SelectedRow.ForeColor")));
            this.gridView2.Appearance.SelectedRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.SelectedRow.GradientMode")));
            this.gridView2.Appearance.SelectedRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.SelectedRow.Image")));
            this.gridView2.Appearance.SelectedRow.Options.UseBackColor = true;
            this.gridView2.Appearance.SelectedRow.Options.UseForeColor = true;
            this.gridView2.Appearance.TopNewRow.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.TopNewRow.BackColor")));
            this.gridView2.Appearance.TopNewRow.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.TopNewRow.GradientMode")));
            this.gridView2.Appearance.TopNewRow.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.TopNewRow.Image")));
            this.gridView2.Appearance.TopNewRow.Options.UseBackColor = true;
            this.gridView2.Appearance.VertLine.BackColor = ((System.Drawing.Color)(resources.GetObject("gridView2.Appearance.VertLine.BackColor")));
            this.gridView2.Appearance.VertLine.GradientMode = ((System.Drawing.Drawing2D.LinearGradientMode)(resources.GetObject("gridView2.Appearance.VertLine.GradientMode")));
            this.gridView2.Appearance.VertLine.Image = ((System.Drawing.Image)(resources.GetObject("gridView2.Appearance.VertLine.Image")));
            this.gridView2.Appearance.VertLine.Options.UseBackColor = true;
            resources.ApplyResources(this.gridView2, "gridView2");
            this.gridView2.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn_TaiKhoanCo,
            this.gridColumn_TieuKhoanCo,
            this.gridColumn_DienGiai,
            this.gridColumn_SoLuong,
            this.gridColumn_DonGia,
            this.gridColumn_ThanhTien,
            this.gridColumn_SoTienMienGiam,
            this.gridColumn_TaiKhoanNo,
            this.gridColumn_TieuKhoanNo});
            this.gridView2.GridControl = this.dgridChiTietPT;
            this.gridView2.Name = "gridView2";
            this.gridView2.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.True;
            this.gridView2.OptionsView.EnableAppearanceEvenRow = true;
            this.gridView2.OptionsView.EnableAppearanceOddRow = true;
            this.gridView2.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
            this.gridView2.OptionsView.ShowFooter = true;
            this.gridView2.OptionsView.ShowGroupPanel = false;
            this.gridView2.CellValueChanged += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.gridView2_CellValueChanged);
            this.gridView2.ValidateRow += new DevExpress.XtraGrid.Views.Base.ValidateRowEventHandler(this.gridView2_ValidateRow);
            // 
            // gridColumn_TaiKhoanCo
            // 
            resources.ApplyResources(this.gridColumn_TaiKhoanCo, "gridColumn_TaiKhoanCo");
            this.gridColumn_TaiKhoanCo.ColumnEdit = this.repositoryItemLookUpEdit_TaiKhoan;
            this.gridColumn_TaiKhoanCo.FieldName = "TaiKhoanCo";
            this.gridColumn_TaiKhoanCo.Name = "gridColumn_TaiKhoanCo";
            // 
            // repositoryItemLookUpEdit_TaiKhoan
            // 
            resources.ApplyResources(this.repositoryItemLookUpEdit_TaiKhoan, "repositoryItemLookUpEdit_TaiKhoan");
            this.repositoryItemLookUpEdit_TaiKhoan.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(((DevExpress.XtraEditors.Controls.ButtonPredefines)(resources.GetObject("repositoryItemLookUpEdit_TaiKhoan.Buttons"))))});
            this.repositoryItemLookUpEdit_TaiKhoan.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] {
            new DevExpress.XtraEditors.Controls.LookUpColumnInfo(resources.GetString("repositoryItemLookUpEdit_TaiKhoan.Columns"), resources.GetString("repositoryItemLookUpEdit_TaiKhoan.Columns1")),
            new DevExpress.XtraEditors.Controls.LookUpColumnInfo(resources.GetString("repositoryItemLookUpEdit_TaiKhoan.Columns2"), resources.GetString("repositoryItemLookUpEdit_TaiKhoan.Columns3"))});
            this.repositoryItemLookUpEdit_TaiKhoan.DisplayMember = "MaTaiKhoan";
            this.repositoryItemLookUpEdit_TaiKhoan.Name = "repositoryItemLookUpEdit_TaiKhoan";
            this.repositoryItemLookUpEdit_TaiKhoan.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.DoubleClick;
            this.repositoryItemLookUpEdit_TaiKhoan.ValueMember = "MaTaiKhoan";
            // 
            // gridColumn_TieuKhoanCo
            // 
            resources.ApplyResources(this.gridColumn_TieuKhoanCo, "gridColumn_TieuKhoanCo");
            this.gridColumn_TieuKhoanCo.FieldName = "MaTieuKhoanCo1";
            this.gridColumn_TieuKhoanCo.Name = "gridColumn_TieuKhoanCo";
            // 
            // gridColumn_DienGiai
            // 
            resources.ApplyResources(this.gridColumn_DienGiai, "gridColumn_DienGiai");
            this.gridColumn_DienGiai.FieldName = "DienGiaiChiTiet";
            this.gridColumn_DienGiai.Name = "gridColumn_DienGiai";
            // 
            // gridColumn_SoLuong
            // 
            resources.ApplyResources(this.gridColumn_SoLuong, "gridColumn_SoLuong");
            this.gridColumn_SoLuong.ColumnEdit = this.repositoryItemTextEdit_NhapSoLuong;
            this.gridColumn_SoLuong.FieldName = "SoLuong";
            this.gridColumn_SoLuong.Name = "gridColumn_SoLuong";
            // 
            // repositoryItemTextEdit_NhapSoLuong
            // 
            resources.ApplyResources(this.repositoryItemTextEdit_NhapSoLuong, "repositoryItemTextEdit_NhapSoLuong");
            this.repositoryItemTextEdit_NhapSoLuong.DisplayFormat.FormatString = "N2";
            this.repositoryItemTextEdit_NhapSoLuong.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemTextEdit_NhapSoLuong.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemTextEdit_NhapSoLuong.Mask.AutoComplete = ((DevExpress.XtraEditors.Mask.AutoCompleteType)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.AutoComplete")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.BeepOnError = ((bool)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.BeepOnError")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.EditMask = resources.GetString("repositoryItemTextEdit_NhapSoLuong.Mask.EditMask");
            this.repositoryItemTextEdit_NhapSoLuong.Mask.IgnoreMaskBlank = ((bool)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.IgnoreMaskBlank")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.MaskType = ((DevExpress.XtraEditors.Mask.MaskType)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.MaskType")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.PlaceHolder = ((char)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.PlaceHolder")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.SaveLiteral = ((bool)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.SaveLiteral")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.ShowPlaceHolders = ((bool)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.ShowPlaceHolders")));
            this.repositoryItemTextEdit_NhapSoLuong.Mask.UseMaskAsDisplayFormat = ((bool)(resources.GetObject("repositoryItemTextEdit_NhapSoLuong.Mask.UseMaskAsDisplayFormat")));
            this.repositoryItemTextEdit_NhapSoLuong.Name = "repositoryItemTextEdit_NhapSoLuong";
            // 
            // gridColumn_DonGia
            // 
            resources.ApplyResources(this.gridColumn_DonGia, "gridColumn_DonGia");
            this.gridColumn_DonGia.ColumnEdit = this.repositoryItemTextEdit_So;
            this.gridColumn_DonGia.FieldName = "DonGia";
            this.gridColumn_DonGia.Name = "gridColumn_DonGia";
            // 
            // repositoryItemTextEdit_So
            // 
            resources.ApplyResources(this.repositoryItemTextEdit_So, "repositoryItemTextEdit_So");
            this.repositoryItemTextEdit_So.DisplayFormat.FormatString = "N0";
            this.repositoryItemTextEdit_So.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemTextEdit_So.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemTextEdit_So.Mask.AutoComplete = ((DevExpress.XtraEditors.Mask.AutoCompleteType)(resources.GetObject("repositoryItemTextEdit_So.Mask.AutoComplete")));
            this.repositoryItemTextEdit_So.Mask.BeepOnError = ((bool)(resources.GetObject("repositoryItemTextEdit_So.Mask.BeepOnError")));
            this.repositoryItemTextEdit_So.Mask.EditMask = resources.GetString("repositoryItemTextEdit_So.Mask.EditMask");
            this.repositoryItemTextEdit_So.Mask.IgnoreMaskBlank = ((bool)(resources.GetObject("repositoryItemTextEdit_So.Mask.IgnoreMaskBlank")));
            this.repositoryItemTextEdit_So.Mask.MaskType = ((DevExpress.XtraEditors.Mask.MaskType)(resources.GetObject("repositoryItemTextEdit_So.Mask.MaskType")));
            this.repositoryItemTextEdit_So.Mask.PlaceHolder = ((char)(resources.GetObject("repositoryItemTextEdit_So.Mask.PlaceHolder")));
            this.repositoryItemTextEdit_So.Mask.SaveLiteral = ((bool)(resources.GetObject("repositoryItemTextEdit_So.Mask.SaveLiteral")));
            this.repositoryItemTextEdit_So.Mask.ShowPlaceHolders = ((bool)(resources.GetObject("repositoryItemTextEdit_So.Mask.ShowPlaceHolders")));
            this.repositoryItemTextEdit_So.Mask.UseMaskAsDisplayFormat = ((bool)(resources.GetObject("repositoryItemTextEdit_So.Mask.UseMaskAsDisplayFormat")));
            this.repositoryItemTextEdit_So.Name = "repositoryItemTextEdit_So";
            // 
            // gridColumn_ThanhTien
            // 
            resources.ApplyResources(this.gridColumn_ThanhTien, "gridColumn_ThanhTien");
            this.gridColumn_ThanhTien.ColumnEdit = this.repositoryItemTextEdit_So;
            this.gridColumn_ThanhTien.FieldName = "SoTien";
            this.gridColumn_ThanhTien.Name = "gridColumn_ThanhTien";
            this.gridColumn_ThanhTien.OptionsColumn.ReadOnly = true;
            this.gridColumn_ThanhTien.SummaryItem.DisplayFormat = resources.GetString("gridColumn_ThanhTien.SummaryItem.DisplayFormat");
            this.gridColumn_ThanhTien.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
            // 
            // gridColumn_SoTienMienGiam
            // 
            resources.ApplyResources(this.gridColumn_SoTienMienGiam, "gridColumn_SoTienMienGiam");
            this.gridColumn_SoTienMienGiam.ColumnEdit = this.repositoryItemTextEdit_So;
            this.gridColumn_SoTienMienGiam.FieldName = "SoTienMienGiam";
            this.gridColumn_SoTienMienGiam.Name = "gridColumn_SoTienMienGiam";
            // 
            // gridColumn_TaiKhoanNo
            // 
            resources.ApplyResources(this.gridColumn_TaiKhoanNo, "gridColumn_TaiKhoanNo");
            this.gridColumn_TaiKhoanNo.ColumnEdit = this.repositoryItemLookUpEdit_TaiKhoan;
            this.gridColumn_TaiKhoanNo.FieldName = "TaiKhoanNo";
            this.gridColumn_TaiKhoanNo.Name = "gridColumn_TaiKhoanNo";
            // 
            // gridColumn_TieuKhoanNo
            // 
            resources.ApplyResources(this.gridColumn_TieuKhoanNo, "gridColumn_TieuKhoanNo");
            this.gridColumn_TieuKhoanNo.FieldName = "MaTieuKhoanNo1";
            this.gridColumn_TieuKhoanNo.Name = "gridColumn_TieuKhoanNo";
            // 
            // repositoryItemCalcEdit_SoLuong
            // 
            resources.ApplyResources(this.repositoryItemCalcEdit_SoLuong, "repositoryItemCalcEdit_SoLuong");
            this.repositoryItemCalcEdit_SoLuong.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(((DevExpress.XtraEditors.Controls.ButtonPredefines)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Buttons"))))});
            this.repositoryItemCalcEdit_SoLuong.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemCalcEdit_SoLuong.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
            this.repositoryItemCalcEdit_SoLuong.Mask.AutoComplete = ((DevExpress.XtraEditors.Mask.AutoCompleteType)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.AutoComplete")));
            this.repositoryItemCalcEdit_SoLuong.Mask.BeepOnError = ((bool)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.BeepOnError")));
            this.repositoryItemCalcEdit_SoLuong.Mask.EditMask = resources.GetString("repositoryItemCalcEdit_SoLuong.Mask.EditMask");
            this.repositoryItemCalcEdit_SoLuong.Mask.IgnoreMaskBlank = ((bool)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.IgnoreMaskBlank")));
            this.repositoryItemCalcEdit_SoLuong.Mask.MaskType = ((DevExpress.XtraEditors.Mask.MaskType)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.MaskType")));
            this.repositoryItemCalcEdit_SoLuong.Mask.PlaceHolder = ((char)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.PlaceHolder")));
            this.repositoryItemCalcEdit_SoLuong.Mask.SaveLiteral = ((bool)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.SaveLiteral")));
            this.repositoryItemCalcEdit_SoLuong.Mask.ShowPlaceHolders = ((bool)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.ShowPlaceHolders")));
            this.repositoryItemCalcEdit_SoLuong.Mask.UseMaskAsDisplayFormat = ((bool)(resources.GetObject("repositoryItemCalcEdit_SoLuong.Mask.UseMaskAsDisplayFormat")));
            this.repositoryItemCalcEdit_SoLuong.Name = "repositoryItemCalcEdit_SoLuong";
            // 
            // txtMaCheDo
            // 
            resources.ApplyResources(this.txtMaCheDo, "txtMaCheDo");
            this.ep.SetError(this.txtMaCheDo, resources.GetString("txtMaCheDo.Error"));
            this.ep.SetIconAlignment(this.txtMaCheDo, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtMaCheDo.IconAlignment"))));
            this.ep.SetIconPadding(this.txtMaCheDo, ((int)(resources.GetObject("txtMaCheDo.IconPadding"))));
            this.txtMaCheDo.Name = "txtMaCheDo";
            this.txtMaCheDo.ReadOnly = true;
            this.txtMaCheDo.TabStop = false;
            this.toolTip1.SetToolTip(this.txtMaCheDo, resources.GetString("txtMaCheDo.ToolTip"));
            // 
            // txtMaCoSo
            // 
            resources.ApplyResources(this.txtMaCoSo, "txtMaCoSo");
            this.ep.SetError(this.txtMaCoSo, resources.GetString("txtMaCoSo.Error"));
            this.ep.SetIconAlignment(this.txtMaCoSo, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("txtMaCoSo.IconAlignment"))));
            this.ep.SetIconPadding(this.txtMaCoSo, ((int)(resources.GetObject("txtMaCoSo.IconPadding"))));
            this.txtMaCoSo.Name = "txtMaCoSo";
            this.txtMaCoSo.RefField = null;
            this.txtMaCoSo.RefTable = null;
            this.txtMaCoSo.TabStop = false;
            this.toolTip1.SetToolTip(this.txtMaCoSo, resources.GetString("txtMaCoSo.ToolTip"));
            this.txtMaCoSo.TextChanged += new System.EventHandler(this.txtMaCoSo_TextChanged);
            // 
            // label5
            // 
            resources.ApplyResources(this.label5, "label5");
            this.ep.SetError(this.label5, resources.GetString("label5.Error"));
            this.ep.SetIconAlignment(this.label5, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label5.IconAlignment"))));
            this.ep.SetIconPadding(this.label5, ((int)(resources.GetObject("label5.IconPadding"))));
            this.label5.Name = "label5";
            this.toolTip1.SetToolTip(this.label5, resources.GetString("label5.ToolTip"));
            // 
            // label15
            // 
            resources.ApplyResources(this.label15, "label15");
            this.ep.SetError(this.label15, resources.GetString("label15.Error"));
            this.ep.SetIconAlignment(this.label15, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label15.IconAlignment"))));
            this.ep.SetIconPadding(this.label15, ((int)(resources.GetObject("label15.IconPadding"))));
            this.label15.Name = "label15";
            this.toolTip1.SetToolTip(this.label15, resources.GetString("label15.ToolTip"));
            // 
            // lblThucThu
            // 
            resources.ApplyResources(this.lblThucThu, "lblThucThu");
            this.ep.SetError(this.lblThucThu, resources.GetString("lblThucThu.Error"));
            this.ep.SetIconAlignment(this.lblThucThu, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("lblThucThu.IconAlignment"))));
            this.ep.SetIconPadding(this.lblThucThu, ((int)(resources.GetObject("lblThucThu.IconPadding"))));
            this.lblThucThu.Name = "lblThucThu";
            this.toolTip1.SetToolTip(this.lblThucThu, resources.GetString("lblThucThu.ToolTip"));
            // 
            // label13
            // 
            resources.ApplyResources(this.label13, "label13");
            this.ep.SetError(this.label13, resources.GetString("label13.Error"));
            this.ep.SetIconAlignment(this.label13, ((System.Windows.Forms.ErrorIconAlignment)(resources.GetObject("label13.IconAlignment"))));
            this.ep.SetIconPadding(this.label13, ((int)(resources.GetObject("label13.IconPadding"))));
            this.label13.Name = "label13";
            this.toolTip1.SetToolTip(this.label13, resources.GetString("label13.ToolTip"));
            // 
            // ep
            // 
            this.ep.ContainerControl = this;
            resources.ApplyResources(this.ep, "ep");
            // 
            // TienMatPhieuThuHocphi
            // 
            resources.ApplyResources(this, "$this");
            this.BackColor = System.Drawing.Color.WhiteSmoke;
            this.Controls.Add(this.txtSoChungTu);
            this.Controls.Add(this.label8);
            this.Controls.Add(this.label13);
            this.Controls.Add(this.label9);
            this.Controls.Add(this.txtMaHocPhi);
            this.Controls.Add(this.txtNgayChungTu);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.txtMaCoSo);
            this.Controls.Add(this.txtMaCheDo);
            this.Controls.Add(this.lstAddnew);
            this.Controls.Add(this.dgridChiTietPT);
            this.Controls.Add(this.txtSoInvoice);
            this.Controls.Add(this.txtSoDuThangNay);
            this.Controls.Add(this.label15);
            this.Controls.Add(this.txtSoDuThangTruoc);
            this.Controls.Add(this.label14);
            this.Controls.Add(this.txtSoTienThucThu);
            this.Controls.Add(this.lblThucThu);
            this.Controls.Add(this.cboLop);
            this.Controls.Add(this.label12);
            this.Controls.Add(this.txtMaNienHoc);
            this.Controls.Add(this.label7);
            this.Controls.Add(this.gridLookUpEdit_txtMaHocSinh);
            this.Controls.Add(this.lblSoGiayBaoHP);
            this.Controls.Add(this.cboNganHang);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.txtNgayHoaDon);
            this.Controls.Add(this.label18);
            this.Controls.Add(this.txtSerialHoaDon);
            this.Controls.Add(this.label17);
            this.Controls.Add(this.txtSoHoaDon);
            this.Controls.Add(this.label16);
            this.Controls.Add(this.txtSoTien);
            this.Controls.Add(this.label11);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.txtDiaChi);
            this.Controls.Add(this.label10);
            this.Controls.Add(this.txtDienGiai);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.txtHoTenNguoiNopTien);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.cmdXemTK);
            this.Controls.Add(this.pnlButtons);
            this.Controls.Add(this.cboLyDoThu);
            this.Controls.Add(this.pnlBottom);
            this.KeyPreview = true;
            this.Name = "TienMatPhieuThuHocphi";
            this.Tag = "";
            this.toolTip1.SetToolTip(this, resources.GetString("$this.ToolTip"));
            this.Load += new System.EventHandler(this.TienMatPhieuThuHocphi_Load);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TienMatPhieuThuHocphi_KeyDown);
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit1)).EndInit();
            this.pnlButtons.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.picboxNote)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.picboxHelp)).EndInit();
            this.pnlBottom.ResumeLayout(false);
            this.pnlNevigator.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.gridLookUpEdit_txtMaHocSinh.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridLookUpEdit_txtMaHocSinhView)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtSoInvoice.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgridChiTietPT)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemLookUpEdit_TaiKhoan)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit_NhapSoLuong)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemTextEdit_So)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemCalcEdit_SoLuong)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ep)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion

		#region [ Command Events ]
		    bool cancelHandlers;
		    TienMatPhieuThuHocphiData ptData;
		    BindingManagerBase bmb;
        
            //Cac bien phan quyen tren form
            bool DuocQuyenThem = true;
            bool DuocQuyenSua = true;
            bool DuocQuyenXoa = true;

		#endregion

		private void TienMatPhieuThuHocphi_Load(object sender, System.EventArgs e) {

            // Sets the UI culture to VietNamese (VietNam) / English
            if (GlobalVariable.WSInfo.Language == "Tiếng Việt")
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("vi-VN");
            else if (GlobalVariable.WSInfo.Language == "English")
                Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");


			cancelHandlers = true;
			try {
				ptData = new TienMatPhieuThuHocphiData();

				intiDatabinding();

				//ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).ColumnChanged +=new DataColumnChangeEventHandler(TienMatPhieuThuHocphi_ColumnChanged);
				//ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).RowDeleted +=new DataRowChangeEventHandler(TienMatPhieuThuHocphi_RowDeleted);
				
				bmb = this.BindingContext[ptData.getDataSet(), "TienMatPT"];

				bmb.PositionChanged +=new EventHandler(bmb_PositionChanged);

			} catch {
				MessageBox.Show(this, RS.ERROR_LOAD_FORM, RS.ERROR_LOAD_FORM_CAPTION, 
					MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
			} finally {
				cancelHandlers = false;
			}

            PublicFunction.PhanQuyenForm(this.Name, GlobalVariable.WSInfo.UserID, out DuocQuyenThem, out DuocQuyenSua, out DuocQuyenXoa);

            if (DuocQuyenThem)
            {
                //cmdAddNew_Click(cmdAddNew, e);
                setEditMode(false);
                sendStatus("Chọn <Thêm> và loại chứng từ cần thêm mới", false);
            }
            else
            {
                setEditMode(false);
                sendStatus("Bạn không có quyền thêm mới", false);
            }

            DataTable dtTK = new DataTable();
            SQLHelper.Fill(dtTK, GlobalVariable.WSInfo.ConnectionString, "SELECT * FROM DM_TAIKHOAN");
            repositoryItemLookUpEdit_TaiKhoan.DataSource = dtTK;

            
		}

		private void bmb_PositionChanged(object sender, System.EventArgs e) {
			if (cancelHandlers) return;

			cancelHandlers = true;
			if (bmb.Count == 0) {
				this.lblRecordInfo.Text = "0/0";
			} else {
				this.lblRecordInfo.Text = (bmb.Position +1) +"/" +bmb.Count;
			}

			cancelHandlers = false;
		}

		private void TienMatPhieuThuHocphi_RowDeleted(object sender, DataRowChangeEventArgs e) {
			if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position].GetChildRows("M_D").Length > 0) {
				this["ThucThu"] = ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Compute("Sum(SoTien)", "SoChungTu='" +this["SoChungTu"] +"'");
			} 
            else {
			   this["ThucThu"] = 0;
			}
			bmb.EndCurrentEdit();
            bmb_PositionChanged(bmb, e);
		}

		private void TienMatPhieuThuHocphi_ColumnChanged(object sender, DataColumnChangeEventArgs e) {
            /*
            if (cancelHandlers) return;
			cancelHandlers = true;
            //MessageBox.Show(e.Column.ColumnName);  

            try
            {
                if (e.Column.ColumnName.ToUpper() == "SOTIEN" || e.Column.ColumnName.ToUpper() == "SOTIENMIENGIAM" || e.Column.ColumnName.ToUpper() == "SOLUONG" || e.Column.ColumnName.ToUpper() == "DONGIA" || e.Column.ColumnName.ToUpper() == "THUESUAT" || e.Column.ColumnName.ToUpper() == "TIGIA")
                {

                    double sumSoTien = 0;
                    double sumSoTienMienGiam = 0;

                    if (!(e.Row["SoLuong"] is DBNull) && !(e.Row["DonGia"] is DBNull))
                        e.Row["SoTien"] = Convert.ToDouble(e.Row["SoLuong"]) * Convert.ToDouble(e.Row["DonGia"]);


                    if (e.Row["SoTien"] is DBNull) e.Row["SoTien"] = 0;
                    if (e.Row["SoTienMienGiam"] is DBNull) e.Row["SoTienMienGiam"] = 0;

                    double soTien = (double)(decimal)e.Row["SoTien"];
                    double soTienMienGiam = (double)(decimal)e.Row["SoTienMienGiam"];

                    sumSoTien = soTien - soTienMienGiam;

                    int numOfRow = ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position].GetChildRows("M_D").Length;

                    if (numOfRow > 0)
                    {
                        sumSoTien = (double)(decimal)ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Compute("Sum(SoTien)", "SoChungTu='" + this["SoChungTu"] + "'");
                        sumSoTienMienGiam = (double)(decimal)ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Compute("Sum(SoTienMienGiam)", "SoChungTu='" + this["SoChungTu"] + "'");
                        //if (numOfRow == dgridChiTietPT  )
                        //{ // dgridChiTietPT.CurrentCell.RowNumber
                        //	sumSoTien += soTien;
                        //}
                    }

                    this["TongTien"] = sumSoTien - sumSoTienMienGiam;   //So tien phai thu
                    this["ThucThu"] = sumSoTien - sumSoTienMienGiam; 
                    try
                    {
                        this["SoDuThangNay"] = (decimal)this["SoDuThangTruoc"] + (decimal)this["ThucThu"] - (decimal)this["TongTien"];
                    }
                    catch {this["SoDuThangNay"] = 0; }


                    bmb.EndCurrentEdit();
                    bmb_PositionChanged(bmb, e);
            
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally {
				cancelHandlers = false;
			}
            */
             
		}

        
		#region [ Commond Methods ]

		private void intiDatabinding() {
			this.txtSoChungTu.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.SoChungTu");
			this.txtNgayChungTu.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.NgayChungTu");
			this.txtNgayChungTu.ActiveDisplayFormat();
            
            this.gridLookUpEdit_txtMaHocSinh.DataBindings.Add("EditValue", ptData.getDataSet(), "TienMatPT.MaDoiTac");
            gridLookUpEdit_txtMaHocSinh.Properties.DataSource = ptData.getTable(TienMatPhieuThuHocphiData.TL.DoiTac);
            this.gridLookUpEdit_txtMaHocSinh.Properties.DisplayMember = "TenDoiTac";
            this.gridLookUpEdit_txtMaHocSinh.Properties.ValueMember = "MaDoiTac";


            this.txtMaNienHoc.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.MaNienHoc");
            this.cboLop.DataBindings.Add("SelectedValue", ptData.getDataSet(), "TienMatPT.MaLop");
            this.txtMaCoSo.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.MaCoSo");
            this.txtSoInvoice.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.SoInvoice");

            this.txtDiaChi.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.DiaChi");
			this.txtDienGiai.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.DienGiai");
			this.txtHoTenNguoiNopTien.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.Hoten");
            this.txtMaCheDo.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.MaCheDo");


            //So tien phai thu (luu vao TONGTIEN)
            this.txtSoTien.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.TongTien");
            this.txtSoTien.DataBindings["Text"].Parse += new ConvertEventHandler(TienMatPhieuThuHocphi_Parse);
            this.txtSoTien.DataBindings["Text"].Format += new ConvertEventHandler(TienMatPhieuThuHocphi_Format);
            
            //So tien thuc thu (luu vao THUCTHU)
            this.txtSoTienThucThu.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.ThucThu");
            this.txtSoTienThucThu.DataBindings["Text"].Parse += new ConvertEventHandler(TienMatPhieuThuHocphi_Parse);
            this.txtSoTienThucThu.DataBindings["Text"].Format += new ConvertEventHandler(TienMatPhieuThuHocphi_Format);

            //So du thang truoc
            this.txtSoDuThangTruoc.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.SoDuThangTruoc");
            this.txtSoDuThangTruoc.DataBindings["Text"].Parse += new ConvertEventHandler(TienMatPhieuThuHocphi_Parse);
            this.txtSoDuThangTruoc.DataBindings["Text"].Format += new ConvertEventHandler(TienMatPhieuThuHocphi_Format);

            //So du thang nay
            this.txtSoDuThangNay.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.SoDuThangNay");
            this.txtSoDuThangNay.DataBindings["Text"].Parse += new ConvertEventHandler(TienMatPhieuThuHocphi_Parse);
            this.txtSoDuThangNay.DataBindings["Text"].Format += new ConvertEventHandler(TienMatPhieuThuHocphi_Format);


            //Ly do thu (dung de dinh khoan)
            this.cboLyDoThu.DataBindings.Add("SelectedValue", ptData.getDataSet(), "TienMatPT.LyDoThuChi");
            this.cboLyDoThu.DataSource = ptData.getTable(TienMatPhieuThuHocphiData.TL.LyDoThuHP);
            this.cboLyDoThu.DisplayMember = "TenHocPhi";
            this.cboLyDoThu.ValueMember = "MaHocPhi";

            //Ma loai chung tu (dung de chon khi addnew, ko binding
            this.lstAddnew.DataSource = ptData.getTable(TienMatPhieuThuHocphiData.TL.ListAddNew);
            this.lstAddnew.DisplayMember= "TenLoaiChungTu";
            this.lstAddnew.ValueMember = "MaLoaiChungTu";

            //Ngan hang
            this.cboNganHang.DataBindings.Add("SelectedValue", ptData.getDataSet(), "TienMatPT.MaNganHang");
            this.cboNganHang.DataSource = ptData.getTable(TienMatPhieuThuHocphiData.TL.NganHang);
            this.cboNganHang.DisplayMember = "TenNganHang";
            this.cboNganHang.ValueMember = "MaNganHang";

            this.txtSoHoaDon.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.SoHoaDon");
            this.txtSerialHoaDon.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.SerialHoaDon");
            this.txtNgayHoaDon.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.NgayHoaDon");
            this.txtNgayHoaDon.ActiveDisplayFormat();

            this.txtMaHocPhi.DataBindings.Add("Text", ptData.getDataSet(), "TienMatPT.MaHocPhi");

            dgridChiTietPT.DataSource = ptData.getDataSet();
            dgridChiTietPT.DataMember =  "TienMatPT.M_D";
		}

		private void TienMatPhieuThuHocphi_Parse(object sender, ConvertEventArgs e) {
			try {
				if (e.Value == null || (string)e.Value == string.Empty) {
					e.Value = DBNull.Value;
				} else {
					e.Value = double.Parse((string)e.Value);
				}
			} catch {
				sendStatus("Bạn vui lòng nhập đúng định dạng số.", true);
			}
		}

        private void TienMatPhieuThuHocphi_Format(object sender, ConvertEventArgs e)
        {
            if (e.Value == DBNull.Value || Convert.IsDBNull(e.Value) ) return;
            
			try {
				if (Convert.IsDBNull(e.Value)) {
					e.Value = "";
				} else {
					e.Value = ((decimal)e.Value).ToString("N0");
				}
			} catch (Exception ex) {
				//sendStatus("Unexpected Error: " +ex.Message, true); //Ko can thiet, gay roi
			}
		}

		DataGridAutoResizeSupporter dgridARS = new DataGridAutoResizeSupporter();
		DataGridStyleFactory dgridSF = new DataGridStyleFactory();


		private void setEditMode(bool edit) {

			cmdAddNew.Enabled = !edit  && DuocQuyenThem ;
			cmdDelete.Enabled = !edit && bmb.Position >= 0 && DuocQuyenXoa ;
			cmdModify.Enabled = !edit && bmb.Position >= 0  && DuocQuyenSua ;
			cmdPrint.Enabled = !edit && bmb.Position >= 0;
			cmdView.Enabled = !edit;
			cmdUpdate.Enabled = edit;
			cmdCancel.Enabled = edit;

			cmdMoveFirst.Enabled = !edit;
			cmdMovePrevious.Enabled = !edit;
			cmdMoveNext.Enabled = !edit;
			cmdMoveLast.Enabled = !edit;

            txtSoChungTu.ReadOnly = true;
			txtNgayChungTu.ReadOnly = !edit;
            txtMaNienHoc.ReadOnly = !edit;
            cboLop.Enabled = edit;
            gridLookUpEdit_txtMaHocSinh.Properties.ReadOnly = !edit;
            txtDiaChi.ReadOnly = !edit;
            txtHoTenNguoiNopTien.ReadOnly = !edit;
            cboLyDoThu.Enabled = edit;

            txtSoTien.ReadOnly = true; // !edit;
            txtSoTienThucThu.ReadOnly = !edit;
            txtSoDuThangTruoc.ReadOnly = !edit;
            txtSoDuThangNay.ReadOnly = true;  //Khoa edit
			txtDienGiai.ReadOnly = !edit;
			
            txtSoHoaDon.ReadOnly = !edit;
            txtNgayHoaDon.ReadOnly= !edit;
            txtSerialHoaDon.ReadOnly = !edit;
  
			gridView2.OptionsBehavior.ReadOnly = !edit;
			cmdXemTK.Enabled = bmb.Position >= 0;

            try
            {
                cboNganHang.Enabled = ptData.TaiKhoanMacDinh == "1121";
                txtSoHoaDon.Enabled = ptData.TaiKhoanMacDinh != "1311";
                txtSerialHoaDon.Enabled = ptData.TaiKhoanMacDinh != "1311";
                txtNgayHoaDon.Enabled = ptData.TaiKhoanMacDinh != "1311";

                txtSoDuThangTruoc.Enabled = ptData.TaiKhoanMacDinh != "1311";
                txtSoDuThangNay.Enabled = ptData.TaiKhoanMacDinh != "1311";
            }
            catch { }
		}

		#endregion

		#region [ Command Events ]

		private void cmdAddNew_Click(object sender, System.EventArgs e) {
			cancelHandlers = true;

            if (ptData.createNewRow(GlobalVariable.WSInfo["TienMat.PhieuThuHP.MaLoaiCT", "HP"]))
            {
				bmb.Position = bmb.Count -1;
				setEditMode(true);
                gridLookUpEdit_txtMaHocSinh.Focus();
			}
			cancelHandlers= false;
			bmb_PositionChanged(bmb, e);
			sendStatus("Đang trong trạng thái thêm mới...", false);


            cboLyDoThu.SelectedIndex = -1; 
		}

		private void cmdSave_Click(object sender, System.EventArgs e) {
            
            ep.Clear();

            if (txtSoChungTu.Text == "") return;

            //Kiem tra su giong nhau giua sochungtu va ngaychungtu
            if (txtNgayChungTu.getDateValue(true).Year.ToString().Substring(2, 2) != txtSoChungTu.Text.Substring(2, 2) || txtNgayChungTu.getDateValue(true).Month.ToString("00") != txtSoChungTu.Text.Substring(4, 2))
            {
                MessageBox.Show("Thời gian làm việc không đúng với ngày chứng từ \nBạn phải login vào chương trình với ngày làm việc thuộc tháng " +
                                              txtNgayChungTu.getDateValue(true).Month.ToString() + " năm " + txtNgayChungTu.getDateValue(true).Year.ToString(),
                                              "Chon sai ngay lam viec", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ep.SetError(txtSoChungTu, "Chọn lại ngày làm việc ngay ở màn hình đăng nhập ban đầu để đánh số chứng từ cho đúng");
                return;
            }

            //Kiem tra so lieu truoc khi luu
            if (gridLookUpEdit_txtMaHocSinh.EditValue.ToString() == "")
            {
                ep.SetError(gridLookUpEdit_txtMaHocSinh, "Bạn vui lòng chọn Học sinh");
                gridLookUpEdit_txtMaHocSinh.Focus();
				showEP = true;
				return;
			}
            if (cboLyDoThu.SelectedIndex == -1)
            {
                ep.SetError(cboLyDoThu, "Vui lòng chọn lý do thu tiền để chúng tôi hạch toán chứng từ");
                cboLyDoThu.Focus();
                showEP = true;
                return;
            }


            //Nếu chứng từ là HP thì phải có thông tin hóa đơn
            /*
            if (txtSoChungTu.Text.Substring(0,2) == "HP")
            {
                if (txtSoHoaDon.Text.Trim() == "")
                {
                    ep.SetError(txtSoHoaDon, "Chưa có số hóa đơn thu học phí");
                    txtSoHoaDon.Focus();
                    return;
                }
                if (txtSerialHoaDon.Text.Trim() == "")
                {
                    ep.SetError(txtSerialHoaDon, "Chưa có số serial hóa đơn thu học phí");
                    txtSerialHoaDon.Focus();
                    return;
                }
            }
            */

            //Nếu chứng từ là NH thì phải có MaNganHang
            if (txtSoChungTu.Text.Substring(0,2) == "NH")
            {
                if (cboNganHang.SelectedIndex == -1)
                {
                    ep.SetError(cboNganHang, "Chưa chọn Ngân hàng nhận học phí");
                    cboNganHang.Focus();
                    return;
                }
            }

            //Tinh toan lai các kiểu tiền cho đúng trước khi lưu
            TinhToanTien();
            
            //Bat dau LU
			// dont regard to this code
			//try {
			//	dgridChiTietPT.CurrentCell = 
			//		new DataGridCell(dgridChiTietPT.CurrentCell.RowNumber +1, 
			//		dgridChiTietPT.CurrentCell.ColumnNumber);
			//} catch {}

			cancelHandlers = true;
			bmb.EndCurrentEdit();
			if (ptData.update()) {
				setEditMode(false);
                sendStatus("Đã lưu phiếu thu " + txtSoChungTu.Text  , false);
			}
			cancelHandlers = false;
			bmb_PositionChanged(bmb, e);
		}

		private void cmdCancel_Click(object sender, System.EventArgs e) {
            cancelHandlers = true;
            try
            {
                bmb.EndCurrentEdit();
                sendStatus("Bỏ qua, không cập nhật", false);
                DialogResult dr = DialogResult.Yes;
                if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).GetChanges() != null &&
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).GetChanges() != null)
                {
                    dr = MessageBox.Show(this, RS.CANCEL_UPDATE, RS.CANCEL_UPDATE_CAPTION,
                        MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                }

                if (dr == DialogResult.Yes)
                {
                    cancelHandlers = true;
                    ptData.getDataSet().RejectChanges();
                    cancelHandlers = false;
                    setEditMode(false);
                    bmb_PositionChanged(bmb, e);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            cancelHandlers = false;
		}

		FormView fv = null;
		private void cmdView_Click(object sender, System.EventArgs e) {
            gridLookUpEdit_txtMaHocSinhView.ClearColumnsFilter();
			if (fv == null) {
                fv = new FormView("Select SoChungtu, convert(varchar, NgayChungtu, 103) as NgayChungTu, HoTen, DienGiai, TongtienUSD, Tigia, TongTien, PhanTramDiscount, TongTienDiscount, ThucThu, isnull(SoChungTuCu, '') as SoChungTuCu, " +
                    "SoHoadon, SerialHoadon, NgayHoadon, UpdateUserID " +
                    "from TienMat WHERE MaLoaiChungTu in (SELECT maloaichungtu FROM dm_maloaichungtu WHERE form = 'HP') " +  //and MaHocPhi <> 'B01' 
                    "order by NgayChungTu, SoChungTu ",
                    GlobalVariable.WSInfo.ConnectionString,
                    GlobalVariable.WSInfo.WorkingDate);
				fv.DateFilterColumns = new string[,] {{"NgayChungTu", "Ngày chứng từ"}, {"UpdateDate", "Ngày cập nhật"}};
                //fv.CollumnFocusInFilterGrid = 2;
			}
			fv.ShowDialog(this);
			if (fv.DialogResult == DialogResult.OK) {
				cancelHandlers = true;
                
                //Truong hop lay phieu cu thi fill ton bo ly do thu (khong loc theo loai chung tu khi chon nhap moi)
                //this.cboLyDoThu.DataSource = ptData.getTable(TienMatPhieuThuHocphiData.TL.LyDoThuHP);

				ptData.initData(fv.SelectedIDs, false);
				setEditMode(false);
                cancelHandlers = false;

				bmb_PositionChanged(bmb, e);
			}			
		}

		private void cmdModify_Click(object sender, System.EventArgs e) {
			if (bmb.Position >= 0) {
				bmb.EndCurrentEdit();
				setEditMode(true);
                sendStatus("Đang trong trạng sửa phiếu thu " + txtSoChungTu.Text  , false);
                //if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position].GetChildRows("M_D").Length > 1)
                //{
					//
                    //dgridChiTietPT.Visible = false ;
                    //this.Size = this.MinimumSize;
                    //cmdXemTK_Click(cmdXemTK, e);
                    //Disable nhung textbox ko the sua neu co nhieu dong o chi tiet
                    //txtSoTien.Enabled = false;
                    //cboLyDoThu.Enabled = false; 
				//}
			}
		}

		private void cmdDelete_Click(object sender, System.EventArgs e) {
			DialogResult dr = MessageBox.Show(this, RS.DELETE_RECORD, RS.DELETE_RECORD_CAPTION, 
				MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
			if (dr == DialogResult.Yes) {
				cancelHandlers = true;

                //Luu vet (Deleted)
                try
                {
                    SQLHelper.ExecuteScalar(GlobalVariable.WSInfo.ConnectionString, "insert into Tienmat_Deleted select * from TienMat " +
                                                                                "where sochungtu = '" + txtSoChungTu.Text + "'");
                }
                catch { };

				bmb.RemoveAt(bmb.Position);
				ptData.update();
				cancelHandlers = false;
				bmb_PositionChanged(bmb, e);
			}
		}

		private void cmdPrint_Click(object sender, System.EventArgs e) {
            try
            {
         
                cmdPrint.Enabled = false;
                
                //Load report
                ReportDocument rpt = new ReportDocument();
                if (txtMaNienHoc.Text.Trim().ToUpper() == "TUYENMOI")
                    rpt.Load(Application.StartupPath + "\\Report\\rpt_TienMat_PhieuThu_HSMoi.rpt");
                else
                    rpt.Load(Application.StartupPath + "\\Report\\rpt_TienMat_PhieuThu.rpt");

                //Set connection
                PublicFunction.SetDBLogonForReport(rpt);

                //Set parameter
                PublicFunction.SetParameter(rpt,"@Sochungtu", txtSoChungTu.Text);
                PublicFunction.SetParameter(rpt,"pBangchu", ReportUtilities.ReportUtilities.g_Trans_VietNam(Double.Parse(txtSoTien.Text), "đồng", true));
                PublicFunction.SetParameter(rpt, "pNguoiLapBieu", GlobalVariable.WSInfo.UserName);
                PublicFunction.SetParameter(rpt, "pThuquy", GlobalVariable.WSInfo["Sys.UserName.Thuquy"]);
                PublicFunction.SetParameter(rpt, "pKetoantruong", GlobalVariable.WSInfo["Sys.UserName.KetoanTruong"]);
                PublicFunction.SetParameter(rpt, "pGiamDoc", GlobalVariable.WSInfo["Sys.UserName.Giamdoc"]);

                //View report
                frmPrintPreview frmPP = new frmPrintPreview(rpt);
                frmPP.ShowDialog();
                frmPP.Dispose();

                rpt.Dispose();
                cmdPrint.Enabled = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
		}


		#endregion

        private void cmdXemTK_Click(object sender, System.EventArgs e) {
            
            ep.Clear();
            showEP = false;

			if (!cmdAddNew.Enabled && cboLyDoThu.SelectedIndex == -1) {
				ep.SetError(cboLyDoThu, "Bạn vui lòng chọn lý do thu !.");
				cboLyDoThu.Focus();
				showEP = true;
				return;
			}
            
            /*
            if (!cmdAddNew.Enabled && txtSoTien.Text.Trim() == "0") {
				ep.SetError(txtSoTien, "Bạn vui lòng nhập số tiền !.");
				txtSoTien.Focus();
				showEP = true;
				return;
			}
            */
	
            //if (!cmdAddNew.Enabled && cboDonViNopTien.SelectedIndex == -1) {
            if (!cmdAddNew.Enabled &&  gridLookUpEdit_txtMaHocSinh.EditValue.ToString() == "" )
            {
				ep.SetError(gridLookUpEdit_txtMaHocSinh, "Bạn vui lòng chọn đơn vị nộp tiền !.");
				gridLookUpEdit_txtMaHocSinh.Focus();
				showEP = true;
				return;
			}

			dgridChiTietPT.Visible = !dgridChiTietPT.Visible;
			if (dgridChiTietPT.Visible) {
				//this.Height += 120;
                this.WindowState = FormWindowState.Maximized;
         	} else {
				this.Size = this.MinimumSize;
				this.WindowState = FormWindowState.Normal;
			}
		}


        bool showEP = false;

	
		
		private object this[string colName] {
            get { return ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position][colName]; }
            set { ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position][colName] = value; }
		}

		

		private void TienMatPhieuThuHocphi_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
			if (e.KeyCode == Keys.Enter) {
				this.SelectNextControl(this.ActiveControl, true, true, true, true);
			} else if (e.KeyCode == Keys.Escape) {
				this.SelectNextControl(this.ActiveControl, true, false, true, true);
			}
		}

		private void cmdMoveFirst_Click(object sender, System.EventArgs e) {
			cancelHandlers = true;
			if (bmb != null && bmb.Count > 0) {
				bmb.Position = 0;
			}
			cancelHandlers = false;
			bmb_PositionChanged(bmb, e);
		}

		private void cmdMovePrevious_Click(object sender, System.EventArgs e) {
			cancelHandlers = true;
			if (bmb != null && bmb.Position > 0) {
				bmb.Position -= 1;
			}
			cancelHandlers = false;
			bmb_PositionChanged(bmb, e);
		}

		private void cmdMoveLast_Click(object sender, System.EventArgs e) {
			cancelHandlers = true;
			if (bmb != null && bmb.Count > 0) {
				bmb.Position = bmb.Count -1;
			}
			cancelHandlers = false;
			bmb_PositionChanged(bmb, e);
		}

		private void cmdMoveNext_Click(object sender, System.EventArgs e) {
			cancelHandlers = true;
			if (bmb != null && bmb.Position < bmb.Count -1) {
				bmb.Position += 1;
			}
			cancelHandlers = false;
			bmb_PositionChanged(bmb, e);
		}

		private void sendStatus(string msg) {
			sendStatus(msg, false);
		}

		private void picboxHelp_Click(object sender, System.EventArgs e) {
		
		}

		private void cmdNote_Click(object sender, System.EventArgs e) {
            SimpleObjectNote son = new SimpleObjectNote(GlobalVariable.WSInfo.ConnectionString,
                this.Text, GlobalVariable.WSInfo.UserID);
			son.ShowDialog(this);
		}
	
		private void sendStatus(string msg, bool error) {
			if (error) {
				lblStatus.ForeColor = Color.Red;
				lblStatus.Text = msg;
			} else {
				lblStatus.ForeColor = Color.Black;
				lblStatus.Text = msg;
			}
		}


		private void cboLyDoThu_SelectedIndexChanged(object sender, System.EventArgs e)
		{
            if (cboLyDoThu.SelectedIndex == -1) return;
            //Neu chua co HS thi thoi
            if (gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow() == null) return;

            if (cboLyDoThu.SelectedIndex == -1)
            {
                return;
            }
            if (gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow() != null && ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaDoiTac"] == null)
                return;
            ep.Clear();
            showEP = false;

            txtSoInvoice.Visible = cboLyDoThu.SelectedValue.ToString() == "A01";  //Thu theo KH
            lblSoGiayBaoHP.Visible = cboLyDoThu.SelectedValue.ToString() == "A01";
            
            //Neu thu theo KH thi load cac phieu KH de chon
            if (cboLyDoThu.SelectedValue.ToString() == "A01")
            {
                string strMaHocTap = ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaDoiTac"].ToString();
                DataTable dt = new DataTable();
                SQLHelper.Fill(dt, GlobalVariable.WSInfo.ConnectionString, "SELECT SoChungTu, NgayChungtu, NgayDuKienThu, HoTen, TongTien, DienGiai, MaHocPhi  from TIENMAT " +
                                                                        "WHERE MaDoitac = '" + strMaHocTap + "' " +
                                                                        "AND MaLoaiChungTu = 'KH'  " +
                                                                        "AND TongTien <>0 " +
                                                                        "AND SoChungTu not in (select SoInvoice from TIENMAT where MaLoaiChungTu <> 'KH' " +
                                                                                                "and  MaDoitac = '" + strMaHocTap + "' and SoInvoice is not null) ");
                txtSoInvoice.Properties.DataSource = dt;

                txtSoTien.Text = "0";
                if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT) != null)
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Clear();
                
                string strDienGiaiKeHoach = "";
                try
                {
                    strDienGiaiKeHoach = (SQLHelper.ExecuteScalar(GlobalVariable.WSInfo.ConnectionString, "SELECT DienGiai FROM TIENMAT WHERE SoChungTu = '" + txtSoInvoice.Text + "'")).ToString();
                }
                catch { }

                txtDienGiai.Text = "Thu học phí " + strDienGiaiKeHoach + " của " + gridLookUpEdit_txtMaHocSinh.Text + " lớp " + ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaLop"].ToString();
                cboLyDoThu.Tag = cboLyDoThu.SelectedIndex;

                return;  //Khong gan detail (se gan o kehoach thu)
            }


            //Thu le (khong theo KH)
            string strMaKhoi = ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaKhoi"].ToString();

            // Gán tài khoản có mặc định cho detail
            try
            {
                if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT) != null)
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Clear();
                ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position]["TongTien"] = 0;
                // Add a default row to detail
                string strSQL = "SELECT MaTaiKhoan, DienGiai, isnull(SoLuong, 0) SoLuong, isnull(DonGia, 0) DonGia " +
                                "FROM DM_HOCPHI_CHITIET D " +
                                "JOIN DM_HOCPHI M ON M.MaHocPhi = D.MaHocPhi " +
                                "WHERE  (LoaiHocPhi = '*') OR  (D.MaHocPhi = '" + cboLyDoThu.SelectedValue + "' AND D.MaKhoi = '" + strMaKhoi + "' AND SoLuong + DonGia >0 ) ";

                SqlDataReader HV_DataReader = SQLHelper.ExecuteReader(GlobalVariable.WSInfo.ConnectionString, strSQL);

                txtDienGiai.Text = cboLyDoThu.Text + " của " + gridLookUpEdit_txtMaHocSinh.Text + " lớp " + ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaLop"].ToString();

                while (HV_DataReader.Read())
                {
                    try
                    {
                        DataRow dr = ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).NewRow();
                        dr["SoChungTu"] = txtSoChungTu.Text;
                        dr["TaikhoanCo"] = HV_DataReader["MaTaiKhoan"];
                        dr["MaTieukhoanCo1"] = gridLookUpEdit_txtMaHocSinh.EditValue;
                        dr["DonGia"] = HV_DataReader["DonGia"];
                        dr["DienGiaiChiTiet"] = HV_DataReader["DienGiai"];
                        if (ptData.TaiKhoanMacDinh == "1311")
                            dr["MaTieukhoanNo1"] = gridLookUpEdit_txtMaHocSinh.EditValue;  //Cong no cua hoc sinh nao
                        ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows.Add(dr);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
                //bmb.EndCurrentEdit();
            }
            catch { }

            cancelHandlers = true;

            cboLyDoThu.Tag = cboLyDoThu.SelectedIndex;

            cancelHandlers = false;

		}

		
       

        protected CNCSoft.EData.VoucherNoGenerator vg;

        
        private void cmdAddNew_Click_1(object sender, EventArgs e)
        {
            lstAddnew.Visible = true;
            lstAddnew.Focus();
        }


        string strPrefixPhieuThuHocPhi;

        private void lstAddnew_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (!lstAddnew.Visible) return;

            strPrefixPhieuThuHocPhi = lstAddnew.SelectedValue.ToString();
            string strTaiKhoanMacDinh = ((DataTable)lstAddnew.DataSource).Rows[lstAddnew.SelectedIndex]["SoTaiKhoan"].ToString();

            // Tao moi
            try
            {
                ptData.TaiKhoanMacDinh = strTaiKhoanMacDinh;
                if (ptData.createNewRow(strPrefixPhieuThuHocPhi))
                {
                    bmb.Position = bmb.Count - 1;
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position]["MaLoaiChungTu"] = strPrefixPhieuThuHocPhi;
                    setEditMode(true);
                    cboLop.Focus();
                }
                bmb_PositionChanged(bmb, e);
                sendStatus("Đang trong trạng thái thêm mới...", false);
            
            }
            catch { }

            lstAddnew.Visible = false;
        }

        
        private void txtSoTienDiscount_TextChanged(object sender, EventArgs e)
        {

        }

        private void cboNganHang_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboNganHang.SelectedIndex == -1) return;
            try
            {
                for (int i = 0; i < ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position].GetChildRows("M_D").Length; i++)
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT).Rows[bmb.Position].GetChildRows("M_D")[i]["MaTieuKhoanNo1"] = cboNganHang.SelectedValue;
            }
            catch { }
        }

        
        
        
        private void cboLop_SelectedIndexChanged(object sender, EventArgs e)
        {

            try
            {
                if (cboLop.SelectedIndex == -1) return;
                gridLookUpEdit_txtMaHocSinhView.ActiveFilterString = "MaLop = '" + cboLop.SelectedValue + "'";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        
        private void TinhToanTien()
        {
            try
            {
                decimal dSoTienPhaiThu = txtSoTien.Text == "" ? 0 : Convert.ToDecimal(txtSoTien.Text);
                decimal dSoTienThucThu = txtSoTienThucThu.Text == "" ? 0 : Convert.ToDecimal(txtSoTienThucThu.Text);
                decimal dSoDuThangTruoc = txtSoDuThangTruoc.Text == "" ? 0 : Convert.ToDecimal(txtSoDuThangTruoc.Text);
                if (dSoTienPhaiThu != 0 || dSoTienThucThu != 0)
                    txtSoDuThangNay.Text = Convert.ToDecimal(dSoDuThangTruoc + dSoTienThucThu - dSoTienPhaiThu).ToString("N0");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void txtMaNienHoc_TextChanged(object sender, EventArgs e)
        {
            try
            {
                if (txtMaNienHoc.Text == "") return;

                cboLop.SelectedValue = "";

                DataTable dt = new DataTable();
                SQLHelper.Fill(dt, GlobalVariable.WSInfo.ConnectionString, "SELECT * FROM DM_LOP WHERE MaNienHoc = '" + txtMaNienHoc.Text + "' AND MaCoSo = '" + txtMaCoSo.Text + "' Order by MaKhoi, STT");

                cboLop.DataSource = dt;
                cboLop.DisplayMember = "TenLop";
                cboLop.ValueMember = "MaLop";
            }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }

        private void txtThangHocPhi_TextChanged(object sender, EventArgs e)
        {

        }

        private void lstAddnew_Leave(object sender, EventArgs e)
        {
            lstAddnew.Visible = false;
        }

      
        private void txtMaCoSo_TextChanged(object sender, EventArgs e)
        {
            txtMaNienHoc_TextChanged(sender, null);
        }

        private void gridLookUpEdit_txtMaHocSinh_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow() == null) return;
                if (gridLookUpEdit_txtMaHocSinh.EditValue.ToString() == "") return;

                string strHoTenNguoiNopTien = ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["TenDoiTac"].ToString();
                string strDiaChi = ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["DiaChi"].ToString();
                string strMaCheDo = ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaCheDo"].ToString();
                string strMaKhoi = ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaKhoi"].ToString();
    
                txtDiaChi.Text = strDiaChi;
                txtHoTenNguoiNopTien.Text = strHoTenNguoiNopTien;
                txtMaCheDo.Text = strMaCheDo;
                
                //Ly do thu (dung de dinh khoan)
                DataTable dt = new DataTable();
                //Tuy theo CHEDO cua HS ma load nhung khoan thu va so tien tuong ung
                SQLHelper.Fill(dt, GlobalVariable.WSInfo.ConnectionString, "Select * from DM_HOCPHI " +
                                                            "Where (LoaiHocPhi = 'KH' OR LoaiHocPhi = '*') OR " +
                                                            "(LoaiHocPhi =  '" + ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaCheDo"].ToString() + "' " +
                                                            "AND MaKhoi = '" + ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaKhoi"].ToString() + "') ");
            
                this.cboLyDoThu.DataSource = dt;
                cboLyDoThu.DisplayMember = "DienGiaiMaHocPhi";
                cboLyDoThu.ValueMember = "MaHocPhi";
                
                //Tinh toan so du thang truoc
                string strSELESoDuThangTruoc =  "select SoDuThangNay from( " +
                                                "select SoDuThangNay, RANK() OVER (PARTITION BY MaDoiTac ORDER BY NgayChungTu desc) AS LanSauCung " +
                                                "from TIENMAT where MaDoitac = '" + gridLookUpEdit_txtMaHocSinh.EditValue.ToString() + "' and SoDuThangNay <> 0 " +
                                                ") data " +
					                            "where LanSauCung =1";
                decimal dSoDuThangTruoc = 0;
                object oSoDuThangTruoc = SQLHelper.ExecuteScalar(GlobalVariable.WSInfo.ConnectionString, strSELESoDuThangTruoc);
                if (oSoDuThangTruoc != null)
                    dSoDuThangTruoc = (decimal)oSoDuThangTruoc;
                txtSoDuThangTruoc.Text = Convert.ToDecimal(dSoDuThangTruoc).ToString("N0");   
                //cboLyDoThu.SelectedIndex = -1;

                //bmb.EndCurrentEdit();
                //bmb_PositionChanged(bmb, e);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            cancelHandlers = false;
        }

       

        private void gridView2_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            if (e.Value != null && ((e.Column.FieldName.ToUpper() == "SOLUONG") || (e.Column.FieldName.ToUpper() == "DONGIA")))
                if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows[e.RowHandle]["SoLuong"] != DBNull.Value && ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows[e.RowHandle]["DonGia"] != DBNull.Value)
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows[e.RowHandle]["SoTien"] = 
                                                                    Convert.ToDecimal(ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows[e.RowHandle]["SoLuong"])
                                                                    * Convert.ToDecimal(ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows[e.RowHandle]["DonGia"]);
        }

        private void txtSoInvoice_Validated(object sender, EventArgs e)
        {
            if (txtSoInvoice.EditValue.ToString() == "") return;
            if (gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow() == null || txtSoInvoice.GetSelectedDataRow() == null ) return;  //Chua co HS

            try
            {
                // Add a default row to detail
                SqlDataReader HV_DataReader = SQLHelper.ExecuteReader(GlobalVariable.WSInfo.ConnectionString,
                                                    "SELECT SoChungTu, TaiKhoanCO, MaTieukhoanCo1, DienGiaiChiTiet, SoLuong, DonGia, SoTien, SoTienMienGiam, TaiKhoanNO, MaTieukhoanNo1 " +
                                                    "FROM TIENMAT_CHITIET  " +
                                                    "WHERE  SoTien <> 0 and SoChungTu = '" + txtSoInvoice.EditValue + "'");

                if (ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT) != null)
                    ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Clear();

                while (HV_DataReader.Read())
                {
                    try
                    {
                        DataRow dr = ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).NewRow();
                        dr["SoChungTu"] = txtSoChungTu.Text;
                        dr["TaikhoanCo"] = HV_DataReader["TaiKhoanNO"];    //Luc lam KH thi NO, bay gio la CO (1311)
                        dr["MaTieukhoanCo1"] = HV_DataReader["MaTieukhoanNo1"];
                        dr["SoLuong"] = HV_DataReader["SoLuong"];
                        dr["DonGia"] = HV_DataReader["DonGia"];
                        decimal SoTien = Convert.ToDecimal(HV_DataReader["SoLuong"]) * Convert.ToDecimal(HV_DataReader["DonGia"]);
                        dr["SoTien"] = SoTien;
                        dr["DienGiaiChiTiet"] = HV_DataReader["DienGiaiChiTiet"];
                        //dr["TaiKhoanNO"] = HV_DataReader["TaiKhoanNO"];
                        //dr["MaTieukhoanCo1"] = HV_DataReader["MaTieukhoanCo1"];

                        ptData.getTable(TienMatPhieuThuHocphiData.TL.TienMatPT_CT).Rows.Add(dr);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }

                try
                {
                    txtSoTien.Text = Convert.ToDecimal(gridColumn_ThanhTien.SummaryItem.SummaryValue).ToString("N0");
                    txtSoTienThucThu.Text = txtSoTien.Text;
                    TinhToanTien();

                    string strDienGiaiKeHoach = "";
                    try
                    {
                        strDienGiaiKeHoach = (SQLHelper.ExecuteScalar(GlobalVariable.WSInfo.ConnectionString, "SELECT DienGiai FROM TIENMAT WHERE SoChungTu = '" + txtSoInvoice.Text + "'")).ToString();
                    }
                    catch { }
                    txtDienGiai.Text = "Thu học phí " + strDienGiaiKeHoach + " của " + gridLookUpEdit_txtMaHocSinh.Text + " lớp " + ((DataRowView)gridLookUpEdit_txtMaHocSinh.GetSelectedDataRow())["MaLop"].ToString();

                    txtMaHocPhi.Text = ((DataRowView)txtSoInvoice.GetSelectedDataRow())["MaHocPhi"].ToString();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                 //bmb.EndCurrentEdit();
                //bmb_PositionChanged(bmb, e);

            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }

        private void gridView2_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
        {
            gridView2.RefreshData();
            txtSoTien.Text = Convert.ToDecimal(gridColumn_ThanhTien.SummaryItem.SummaryValue).ToString("N0");
            txtSoTienThucThu.Text = txtSoTien.Text;
        }

        private void txtSoTienThucThu_Validated(object sender, EventArgs e)
        {
            TinhToanTien();
        }

        private void txtSoDuThangTruoc_Validated(object sender, EventArgs e)
        {
            TinhToanTien();
        }

        private void txtSoInvoice_EditValueChanged(object sender, EventArgs e)
        {

        }


   
	}
}